def METHOD_NAME(self, loader, path, entities, cache=True):
    """
    Return global variables for the `all` group in the inventory file
    """
    global FOUND
    if not isinstance(entities, list):
        entities = [entities]
    if not FOUND:
        FOUND = self.find_variable_source(path, loader)
    variables = {}
    for entity in entities:
        if not isinstance(entity, (Host, Group)):
            # Changed the error message because the TYPE_REGEX of ansible was triggering
            # unidiomatic-typecheck because of the `or` word before the type  call...
            raise AnsibleParserError(f"Supplied entity is of type {type(entity)} but must be of type Host or Group instead")
        if entity.name != "all":
            continue
        print(entity.name, path)
        for path in FOUND:
            new_data = loader.load_from_file(path, cache=True, unsafe=True)
            if new_data:
                variables = combine_vars(variables, new_data)
    return variables