What is the function of the participle "wailing" in the sentence below? The wailing toddler was having a temper tantrum.

The function of the participle "wailing" in the sentence is to describe the toddler's behavior or state, indicating that the toddler was making a loud, high-pitched crying sound.