[VXACE] How do I check troop composition?

A script I'm using gives features conditions based on script formulas, and I want to make a condition that only applies when the enemy troop contains a specific enemy or enemies. I thought it might be something like '$game_troop.include?[x]' but I want to make sure I have it right.
$game_troop.members.any? {|member| member.enemy_id == ID OF ENEMY }
Thanks a lot.

Original thread: https://forums.rpgmakerweb.com/threads/vxace-how-do-i-check-troop-composition.124478/