code: def depth(self):
          
          if self._depth_cache is not None:
              return self._depth_cache
          depth, node = 1, self
          while node.package is not None:
              depth += 1
              node = node.package
          self._depth_cache = depth
          return depth
docs: Property to tell the depth of the node in the tree.
  
          Returns:
              int: the node's depth in the tree.