More concise: `return (not 'latex' in template['template_id'] or course.use_latex_compiler)`