def METHOD_NAME(self, filename):
    """Checks if this is a valid template/output filename."""
    _, ext = self.splitext(filename)
    for (_, templateformat), _ in self.outputoptions.items():
        if ext == templateformat:
            return True
    return False