def METHOD_NAME(self, template):
    """
    Check if a template is configured in aj config files and use it.
    If not, fallback to the entry in DEFAULT_TEMPLATES, i.e.
    default templates in Ajenti.
    :param template: Name of the template
    :type template: basestring
    :return: Path of template to use
    :rtype: basestring
    """
    template_path = aj.config.data['email']['templates'].get(template, 'default')
    if template_path == 'default' or not os.path.isfile(template_path):
        template_path = DEFAULT_TEMPLATES[template]
    return template_path