def METHOD_NAME(filename):
    """Load playbook file using Python's YAML parser."""
    if not (filename.endswith("yml") or filename.endswith("yaml")):
        return []
    # print("Processing:", playbook)
    try:
        with open(filename, "rt") as playbook_file:
            data = yaml.safe_load(playbook_file)
    except yaml.scanner.ScannerError:  # If not a YAML/JSON file.
        return []
    except yaml.parser.ParserError:  # If not a YAML/JSON file.
        return []
    else:
        return data if data else []