code: def str_to_class(s):
      
      lst = s.split(".")
      klass = lst[-1]
      mod_list = lst[:-1]
      module = ".".join(mod_list)
      try:
          mod = __import__(module)
          if hasattr(mod, klass):
              return getattr(mod, klass)
          else:
              return None
      except ImportError:
          return None
docs: Alternate helper function to map string class names to module classes.