code: def register_lookup_handler(lookup_type, handler_or_path):
      
      handler = handler_or_path
      if isinstance(handler_or_path, basestring):
          handler = load_object_from_string(handler_or_path)
      LOOKUP_HANDLERS[lookup_type] = handler
      if type(handler) != type:
          # Hander is a not a new-style handler
          logger = logging.getLogger(__name__)
          logger.warning("Registering lookup `%s`: Please upgrade to use the "
                         "new style of Lookups." % lookup_type)
          warnings.warn(
              # For some reason, this does not show up...
              # Leaving it in anyway
              "Lookup `%s`: Please upgrade to use the new style of Lookups"
              "." % lookup_type,
              DeprecationWarning,
              stacklevel=2,
          )
docs: Register a lookup handler.
  
      Args:
          lookup_type (str): Name to register the handler under
          handler_or_path (OneOf[func, str]): a function or a path to a handler