code: def import_class(classpath):
      
      modname, classname = classpath.rsplit(".", 1)
      module = importlib.import_module(modname)
      klass  = getattr(module, classname)
      return klass
docs: Import the class referred to by the fully qualified class path.
  
      Args:
          classpath: A full "foo.bar.MyClass" path to a class definition.
  
      Returns:
          The class referred to by the classpath.
  
      Raises:
          ImportError: If an error occurs while importing the module.
          AttributeError: IF the class does not exist in the imported module.