def match_bag(context, bags):
    """Matches bag to the file for which an event is triggered and returns bag
    or list of all bags to run Fixity against.
    Args:
        context (obj): Object that contains event context information
        bags (set): List of bags to match against
    """
    filename = context.resource["name"]
    for bag in bags:
        if bag in filename:
            return [bag]
    return bags