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: Method lookup strategy. Checks for an exact match before traversing
  the set of registered methods according to the current ordering.
  
  Args:
      types: A tuple of types that gets compared with the signatures
          of registered methods to determine compatibility.
  
  Returns:
      The first method encountered with a matching signature.
docstr_tok: ["Method","lookup","strategy",".","Checks","for","an","exact","match","before","traversing","the","set","of","registered","methods","according","to","the","current","ordering",".","Args",":","types",":","A","tuple","of","types","that","gets","compared","with","the","signatures","of","registered","methods","to","determine","compatibility",".","Returns",":","The","first","method","encountered","with","a","matching","signature","."]
code: def dispatch(self, *types: Type) -> Callable:
      r"""Method lookup strategy. Checks for an exact match before traversing
      the set of registered methods according to the current ordering.
  
      Args:
          types: A tuple of types that gets compared with the signatures
              of registered methods to determine compatibility.
  
      Returns:
          The first method encountered with a matching signature.
      """
      if types in self.funcs:
          return self.funcs[types]
      try:
          return next(self.dispatch_iter(*types))
      except StopIteration:
          return None
  
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 4 for calling the Dispatcher obj's underlying member method code with example usage: obj.dispatch() and returns: self, next, None