def _find_template(template_name, app_label=None, model_name=None):
    """
    Finds a template_name for the given, optional ``app_label`` . ``model_name``
    """
    if app_label is None and model_name is None:
        return 'frontendadmin/%s' % template_name
    
    try:
        name = 'frontendadmin/%s_%s_%s' % (app_label, model_name, template_name)
        get_template(name)
        return name
    except TemplateDoesNotExist:
        return 'frontendadmin/%s' % template_name
dataset/ETHPy150Open bartTC/django-frontendadmin/frontendadmin/views.py/_find_template/original