def METHOD_NAME(self, template_name, context=None):
    """Generate list of dependencies for a template."""
    # We can cache here because dependencies should
    # not change between runs
    if self.cache.get(template_name, None) is None:
        template = self.lookup.get_template(template_name)
        dep_filenames = self.get_deps(template.filename, context)
        deps = [template.filename]
        for fname in dep_filenames:
            # yes, it uses forward slashes on Windows
            deps += self.METHOD_NAME(fname.split('/')[-1], context)
        self.cache[template_name] = list(set(deps))
    return self.cache[template_name]