code: def import_class(classpath, package=None):
      
      if '.' in classpath:
          module, classname = classpath.rsplit('.', 1)
          if package and not module.startswith('.'):
              module = '.{0}'.format(module)
          mod = import_module(module, package)
      else:
          classname = classpath
          mod = import_module(package)
  
      return getattr(mod, classname)
docs: Load and return a class