code: def load_class(ctype):
      """
      Helper function to take a string with the neon module and
      classname then import and return  the class object
  
      Arguments:
          ctype (str): string with the neon module and class
                       (e.g. 'neon.layers.layer.Linear')
      Returns:
          class
      """
      # extract class name and import neccessary module.
      class_path = ctype
      parts = class_path.split(".")
      module = ".".join(parts[:-1])
      try:
          clss = __import__(module)
          for comp in parts[1:]:
              clss = getattr(clss, comp)
          return clss
      except (ValueError, ImportError) as err:
          if len(module) == 0:
              # try to find the module inside neon
              pkg = sys.modules["neon"]
              prfx = pkg.__name__ + "."
              for imptr, nm, _ in pkgutil.iter_modules(
                  pkg.__path__, prefix=prfx
              ):
                  mod = importlib.import_module(nm)
                  if hasattr(mod, ctype):
                      return getattr(mod, ctype)
          raise err
  
file_path: neon/neon/util/persist.py
imports: import importlib
  import logging
  import os
  import pkgutil
  import sys
  import appdirs
  from neon.util.compat import pickle, pickle_load
label_desc: Use image node_id 7 for calling a global function with example usage: load_class(ctype) and returns: clss, getattr