'Returns the templates for the specified type, or None if none is found.'

def get_templates_of_type(self, template_type):

    template_dict = next((template for template in self.templates if (template.get('type') == template_type)), None)
    return (template_dict.get('templates') if template_dict else None)
