code: def get_containing(self, name, depth = 0):
          
          ctx_dict = object.__getattribute__(self, '__dict__')
          if name in ctx_dict:
              if depth <= 0:
                  return self
              depth -= 1
          parent = ctx_dict.get('_parent')
          if parent is None:
              return None
          return parent.get_containing(name, depth = depth)
docs: Return the n-th (n = ``depth``) context containing attribute named ``name``.