def load_content(file_path):
    """
    Loads content from file_path if file_path's extension
    is one of allowed ones (See ALLOWED_EXTS).
    Throws UnsupportedMetaException on disallowed filetypes.
    :param file_path: Absolute path to the file to load content from.
    :type file_path: ``str``
    :rtype: ``dict``
    """
    file_name, file_ext = os.path.splitext(file_path)

    if file_ext not in ALLOWED_EXTS:
        raise Exception(
            "Unsupported meta type %s, file %s. Allowed: %s"
            % (file_ext, file_path, ALLOWED_EXTS)
        )

    parser_func = PARSER_FUNCS.get(file_ext, None)

    with open(file_path, "r") as fd:
        return parser_func(fd) if parser_func else fd.read()

    Loads content from file_path if file_path's extension
    is one of allowed ones (See ALLOWED_EXTS).
    Throws UnsupportedMetaException on disallowed filetypes.
    :param file_path: Absolute path to the file to load content from.
    :type file_path: ``str``
    :rtype: ``dict``
    
st2client/tests/fixtures/loader.py