code: def _real_register(self, input_type: type, *args) -> Type:
      name = input_type.__name__.lower()
      name_target = self._names[name] = (input_type, set())
  
      if issubclass(input_type, Targeted):
          target = input_type.getTarget()
      else:
          target = None
  
      if issubclass(input_type, Searcher):
          module_type = module_base = Searcher
          module_args = ()
      else:
          module_type: Optional[Type] = None
          module_base = None
  
          # Work out what module type this is
          if len(args) == 0 and hasattr(input_type, "__orig_bases__"):
              for i in input_type.__orig_bases__:
                  if module_type is not None:
                      raise TypeError(
                          f"Type derived from multiple registrable base classes {i} and {module_type}"
                      )
                  module_base = get_origin(i)
                  if module_base not in self._modules:
                      continue
                  module_type = i
          else:
              for i in self._modules:
                  if not issubclass(input_type, i):
                      continue
                  if module_type is not None:
                      raise TypeError(
                          f"Type derived from multiple registrable base classes {i} and {module_type}"
                      )
                  module_type = i
          if module_type is None:
              raise TypeError("No registrable base class")
  
          # Replace input type with polymorphic checker if required
          if issubclass(input_type, Checker):
              if len(args) == 0:
                  arg = [
                      get_args(i)
                      for i in input_type.__orig_bases__
                      if get_origin(i) == Checker
                  ][0]
                  if len(arg) != 1:
                      raise TypeError("No argument for Checker")
                  input_type = input_type.convert({arg[0]})
              else:
                  input_type = input_type.convert(set(args))
              self._register_one(input_type, PolymorphicChecker, [])
              # Refresh the names with the new type
              name_target = self._names[name] = (
                  input_type,
                  {PolymorphicChecker},
              )
  
          # Now handle the difference between register and register_multi
          if len(args) == 0:
              if module_type is PolymorphicChecker:
                  module_base = PolymorphicChecker
              elif module_base is None:
                  raise TypeError("No type argument given")
              self._register_one(
                  input_type, module_base, get_args(module_type)
              )
              name_target[1].add(module_base)
          else:
              if module_base is not None:
                  raise TypeError(
                      f"Redundant type argument for {module_type}"
                  )
              module_base = module_type
              for module_args in args:
                  # Correct missing brackets
                  if not isinstance(module_args, tuple):
                      module_args = (module_args,)
  
                  self._register_one(
                      input_type, module_base, module_args
                  )
                  name_target[1].add(module_type[module_args])
  
      name_target[1].add(module_type)
  
      if target is not None and issubclass(module_base, Targeted):
          self._targets.setdefault(target, {}).setdefault(
              module_type, []
          ).append(input_type)
  
      return input_type
  
file_path: Ciphey/ciphey/iface/_registry.py
imports: from typing import Any, Dict, List, Optional, Set, Tuple, Type, Union
  from .None import _fwd
  from ._modules import *
label_desc: Use image node_id 2 for calling the Registry obj's underlying member method code with example usage: obj._real_register(input_type) and returns: input_type