code: def __getitem__(self, key):
      # Iterate all dicts, last to first, and return value as soon as one is
      # found.
  
      if key in self._dependencies:
          return self._dependencies[key].resolve(self)
  
      for dct in self._chain.reverse():
          try:
              return dct[key]
          except KeyError:
              pass
      raise KeyError(key)
  
imports: import functools
  import inspect
  import itertools
  from operator import attrgetter
  from typing import Any
  from gluonts.pydantic import pydantic, deep_update
label_desc: Use image node_id 9 for calling the Settings obj's underlying member method code with example usage: obj.__getitem__(key) and returns: self, dct