code: def __getitem__(self, key):
      key = get_origin(key)
      if self.default is None:
          return self.registry[key]
      return self.registry.get(key, self.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 4 for calling the KeyedRegistry obj's underlying member method code with example usage: obj.__getitem__(key) and returns: self, self