def is_sub_to_any_kind(self, *super_entity_kinds):
if super_entity_kinds:<EOL><INDENT>if len(super_entity_kinds) == <NUM_LIT:1>:<EOL><INDENT>entity_pks = EntityRelationship.objects.filter(<EOL>super_entity__entity_kind=super_entity_kinds[<NUM_LIT:0>]<EOL>).select_related('<STR_LIT>', '<STR_LIT>').values_list('<STR_LIT>', flat=True)<EOL><DEDENT>else:<EOL><INDENT>entity_pks = EntityRelationship.objects.filter(<EOL>super_entity__entity_kind__in=super_entity_kinds<EOL>).select_related('<STR_LIT>', '<STR_LIT>').values_list('<STR_LIT>', flat=True)<EOL><DEDENT>return self.filter(pk__in=entity_pks)<EOL><DEDENT>else:<EOL><INDENT>return self<EOL><DEDENT>
Find all entities that have super_entities of any of the specified kinds