import pkg_resources


def get_template_file(filename):
    """ Gets the content of one of the template files in the PhenoAI package

    Parameters
    ----------
    filename: str
        Name of the template file to be read

    Returns
    -------
    template: str
        Contents of the requested file"""
    path = '/'.join(('templates', filename))
    template = pkg_resources.resource_string('phenoai', path)
    template = template.decode("utf-8")
    return template