class_docstr: Clearing house for multiple dispatch functionality. This class extends
  `<multipledispatch.Dispatcher>` by: (i) generalizing the argument encoding
  convention during method lookup, (ii) implementing `__getitem__` as a dedicated
  method lookup function.
class_docstr_tok: ["Clearing","house","for","multiple","dispatch","functionality",".","This","class","extends","`","<","multipledispatch.Dispatcher",">","`","by",":","(","i",")","generalizing","the","argument","encoding","convention","during","method","lookup",",","(","ii",")","implementing","`","__getitem__","`","as","a","dedicated","method","lookup","function","."]
docstr: Args:
      name: A string identifier for the `Dispatcher` instance.
      doc: A docstring for the multiply dispatched method(s).
      encoder: A callable that individually transforms the arguments passed
          at runtime in order to construct the key used for method lookup as
          `tuple(map(encoder, args))`. Defaults to `type`.
docstr_tok: ["Args",":","name",":","A","string","identifier","for","the","`","Dispatcher","`","instance",".","doc",":","A","docstring","for","the","multiply","dispatched","method","(","s",")",".","encoder",":","A","callable","that","individually","transforms","the","arguments","passed","at","runtime","in","order","to","construct","the","key","used","for","method","lookup","as","`","tuple","(","map","(","encoder",",","args",")",")","`",".","Defaults","to","`","type","`","."]
code: def __init__(
      self,
      name: str,
      doc: Optional[str] = None,
      encoder: Callable[Any, Type] = type,
  ) -> None:
      """
      Args:
          name: A string identifier for the `Dispatcher` instance.
          doc: A docstring for the multiply dispatched method(s).
          encoder: A callable that individually transforms the arguments passed
              at runtime in order to construct the key used for method lookup as
              `tuple(map(encoder, args))`. Defaults to `type`.
      """
      super().__init__(name=name, doc=doc)
      self._encoder = encoder
  
file_path: botorch/botorch/utils/dispatcher.py
imports: from __future__ import annotations
  from inspect import getsource, getsourcefile
  from typing import Any, Callable, Optional, Tuple, Type
  from multipledispatch.dispatcher import Dispatcher, MDNotImplementedError, str_signature
label_desc: Use image node_id 1 to create a new Dispatcher object from inherited base classes: MDDispatcher with example: obj = Dispatcher(name, doc, encoder)