def METHOD_NAME(cls, event, mode):
    mode_type = mode.get('type')
    if mode_type == 'ec2-instance-state':
        resource_ids = [event.get('detail', {}).get('instance-id')]
    elif mode_type == 'asg-instance-state':
        resource_ids = [event.get('detail', {}).get('AutoScalingGroupName')]
    elif mode_type != 'cloudtrail':
        return None
    else:
        resource_ids = cls.get_trail_ids(event, mode)
    if not isinstance(resource_ids, (tuple, list)):
        resource_ids = [resource_ids]
    return list(filter(None, resource_ids))