code: def convert(cls, template):
      if template and isinstance(template, str):
          try:
              template = Template[template.upper()]
          except KeyError:
              raise exception.InvalidTemplateError(template)
      return template
  
file_path: sklearn-porter/sklearn_porter/enums/__init__.py
imports: from enum import Enum
  from sklearn_porter.language import *
  from sklearn_porter import exceptions
label_desc: Use image node_id 1 for calling the Template obj's underlying member method code with example usage: obj.convert(cls, template) and returns: template