docs: def load_class(alias):
      """
      Finds the class registered to the alias.
  
      The search is done in order:
        1. Checks if the class name has been registered via L{register_class}
           or L{register_package}.
        2. Checks all functions registered via L{register_class_loader}.
        3. Attempts to load the class via standard module loading techniques.
  
      @param alias: The class name.
      @type alias: C{string}
      @raise UnknownClassAlias: The C{alias} was not found.
      @raise TypeError: Expecting class type or L{ClassAlias} from loader.
      @return: Class registered to the alias.
      @rtype: C{classobj}
      """
      # Try the CLASS_CACHE first
      try:
          return CLASS_CACHE[alias]
      except KeyError:
          pass
  
      for loader in CLASS_LOADERS:
          klass = loader(alias)
  
          if klass is None:
              continue
  
          if isinstance(klass, python.class_types):
              return register_class(klass, alias)
          elif isinstance(klass, ClassAlias):
              CLASS_CACHE[klass.alias] = klass
              CLASS_CACHE[klass.klass] = klass
  
              return klass
  
          raise TypeError("Expecting class object or ClassAlias from loader")
  
      mod_class = alias.split('.')
  
      if mod_class:
          module = '.'.join(mod_class[:-1])
          klass = mod_class[-1]
  
          try:
              module = util.get_module(module)
          except (ImportError, AttributeError):
              pass
          else:
              klass = getattr(module, klass)
  
              if isinstance(klass, python.class_types):
                  return register_class(klass, alias)
              elif isinstance(klass, ClassAlias):
                  CLASS_CACHE[klass.alias] = klass
                  CLASS_CACHE[klass.klass] = klass
  
                  return klass.klass
              else:
                  raise TypeError("Expecting class type or ClassAlias from loader")
  
      # All available methods for finding the class have been exhausted
      raise UnknownClassAlias("Unknown alias for %r" % (alias,))