code: def __init__(self, default=None):
      # TODO make registry a WeakKeyDictionary
      self.default = (
          default if default is None else PartialDefault(default)
      )
      self.registry = defaultdict(
          lambda: PartialDispatcher(default=default)
      )
  
imports: from collections import defaultdict
  from multipledispatch.dispatcher import Dispatcher, expand_tuples
  from funsor.typing import Variadic, deep_type, get_origin, get_type_hints, typing_wrap
label_desc: Use image node_id 1 to create a new KeyedRegistry object from inherited base classes: object with example: obj = KeyedRegistry(default)