import pkg_resources


def GetTemplates(templateType:str, fqdn:str):
    """Returns a dictionary of template names and paths.
    templateType - well known name of a type of file.
    fqdn - entity fqdn for which we are searching."""
    entrypoints = pkg_resources.iter_entry_points("fiepipe.plugin.templates.file")
    ret = {}
    for entrypoint in entrypoints:
        method = entrypoint.load()
        method(templateType,fqdn,ret)
    return ret