class_docstr: Iterative lookup in a stack of dicts
  
  Assignments go into an internal dict that is also the first place
  where a lookup is done.
class_docstr_tok: ["Iterative","lookup","in","a","stack","of","dicts","Assignments","go","into","an","internal","dict","that","is","also","the","first","place","where","a","lookup","is","done","."]
docstr: Shallow copy
docstr_tok: ["Shallow","copy"]
code: def __deepcopy__(self, memo: dict[Any, Any]) -> StackedLookup:
      """
      Shallow copy
      """
      cls = self.__class__
      result = cls.__new__(cls)
      memo[id(self)] = result
      old = self.__dict__
      new = result.__dict__
  
      for key, item in old.items():
          new[key] = item
          memo[id(new[key])] = new[key]
  
      return result
  
imports: from __future__ import annotations
  from collections.abc import MutableMapping
  from contextlib import suppress
  from dataclasses import dataclass
  from functools import lru_cache
  from typing import TYPE_CHECKING
label_desc: Use image node_id 12 for calling the StackedLookup obj's underlying member method code with example usage: obj.__deepcopy__(memo) and returns: result