code: def _str_to_type(cls, context_class, string):
          
  
          if string in cls._TYPE_NAMES_BUILTIN:
              return eval(string)
  
          module_ = sys.modules[context_class.__module__]
  
          if hasattr(module_, string):
              return getattr(module_, string)
  
          return cls._str_to_type_from_member_module(module_, string)
docs: :type context_class: type
          :type string: str
  
          :rtype: type