Some caterpillars have the ability to inflate parts of their head to appear snake-like .
The caterpillars also have colors with similar functions .