def METHOD_NAME(filename):
    """Get metadata from file.
    """
    CONVERTERS = {
        "description": str,
        "keywords": string_to_list,
       "features": string_to_list,
        "authors": string_to_list,
        "arguments": string_to_list,
        "base": string_to_list,
        "version": str,
        "pylith_version": string_to_list,
    }
    if not os.path.isfile(filename):
        raise IOError(f"Could not open file '{filename}' to read metadata.")
    base, ext = os.path.splitext(str(filename))
    if ext == ".cfg":
        from pythia.pyre.inventory.cfg.CodecConfig import CodecConfig
        reader = CodecConfig()
    else:
        raise NotImplementedError(f"Reading '{ext}' file not implemented.")
    registry = reader.open(base)
    properties = None
    if registry and \
        "inventory" in registry.keys() and \
            "pylithapp" in registry["inventory"].facilities.keys():
        facilities = registry["inventory"].facilities["pylithapp"].facilities
        properties = facilities["metadata"].properties if "metadata" in facilities else None
        if properties:
            for key, descriptor in properties.items():
                descriptor.value = CONVERTERS[key](descriptor.value)
    return properties