class_docstr: Dispatch methods based on type signature
  Use ``dispatch`` to add implementations
  Examples
  --------
  >>> # xdoctest: +SKIP("bad import name")
  >>> from multipledispatch import dispatch
  >>> @dispatch(int)
  ... def f(x):
  ...     return x + 1
  >>> @dispatch(float)
  ... def f(x):
  ...     return x - 1
  >>> f(3)
  4
  >>> f(3.0)
  2.0
docstr: register dispatcher with new implementation
  >>> # xdoctest: +SKIP
  >>> f = Dispatcher('f')
  >>> @f.register(int)
  ... def inc(x):
  ...     return x + 1
  >>> @f.register(float)
  ... def dec(x):
  ...     return x - 1
  >>> @f.register(list)
  ... @f.register(tuple)
  ... def reverse(x):
  ...     return x[::-1]
  >>> f(1)
  2
  >>> f(1.0)
  0.0
  >>> f([1, 2, 3])
  [3, 2, 1]
docstr_tok: ["register","dispatcher","with","new","implementation",">",">",">","#","xdoctest",":","+SKIP",">",">",">","f","=","Dispatcher","(","'","f","'",")",">",">",">","@","f.register","(","int",")","...","def","inc","(","x",")",":","...","return","x","+","1",">",">",">","@","f.register","(","float",")","...","def","dec","(","x",")",":","...","return","x","-","1",">",">",">","@","f.register","(","list",")","...","@","f.register","(","tuple",")","...","def","reverse","(","x",")",":","...","return","x","[",":",":-1","]",">",">",">","f","(","1",")","2",">",">",">","f","(","1.0",")","0.0",">",">",">","f","(","[","1",",","2",",","3","]",")","[","3",",","2",",","1","]"]
code: def register(self, *types, **kwargs):
      """register dispatcher with new implementation
      >>> # xdoctest: +SKIP
      >>> f = Dispatcher('f')
      >>> @f.register(int)
      ... def inc(x):
      ...     return x + 1
      >>> @f.register(float)
      ... def dec(x):
      ...     return x - 1
      >>> @f.register(list)
      ... @f.register(tuple)
      ... def reverse(x):
      ...     return x[::-1]
      >>> f(1)
      2
      >>> f(1.0)
      0.0
      >>> f([1, 2, 3])
      [3, 2, 1]
      """
  
      def _df(func):
          self.add(types, func, **kwargs)  # type: ignore[call-arg]
          return func
  
      return _df
  
imports: from warnings import warn
  import inspect
  from .conflict import ordering, ambiguities, super_signature, AmbiguityWarning
  from .utils import expand_tuples
  from .variadic import Variadic, isvariadic
  import itertools
label_desc: Use image node_id 2 for calling the Dispatcher obj's underlying member method code with example usage: obj.register() and returns: _df, func