parameters: (self, key)
return_statement: return item
docstring: Lookup a variable or raise `KeyError` if the variable is
          undefined.
docstring_summary: Lookup a variable or raise `KeyError` if the variable is
          undefined.
docstring_tokens: Lookup a variable or raise KeyError if the variable is undefined .
function: def __getitem__(self, key):
          """Lookup a variable or raise `KeyError` if the variable is
          undefined.
          """
          item = self.resolve_or_missing(key)
          if item is missing:
              raise KeyError(key)
          return item
function_tokens: def __getitem__ ( self , key ) : item = self . resolve_or_missing ( key ) if item is missing : raise KeyError ( key ) return item