trees.py
def _help_depth(self, tree: QuadTree) -> Optional[int]:
        """
        Return the depth of the subtree <tree> relative to <self>. Return
        None if <tree> is not a descendant of <self>,  if <tree> is <self>
        return 0.
        === Precondition ===
        - This function is only called to the trees other than the root
        QuadTree.
        """
        if self.is_leaf():
            if tree is self:
                return 0
            else:
                return None
        else:
            subtree = self._point_position(tree._centre)[0]
            if subtree:
                dep = subtree._help_depth(tree)
                if dep is not None:
                    return 1 + dep

        Return the depth of the subtree <tree> relative to <self>. Return
        None if <tree> is not a descendant of <self>,  if <tree> is <self>
        return 0.
        === Precondition ===
        - This function is only called to the trees other than the root
        QuadTree.
        
Return the depth of the subtree  relative to . Return
None if  is not a descendant of ,  if  is 
return 0.
Precondition
This function is only called to the trees other than the root
QuadTree.
Return the depth of the subtree relative to . Return None if is not a descendant of if is return 0 . Precondition This function is only called to the trees other than the root QuadTree .
def _help_depth(self, tree: QuadTree) -> Optional[int]:
        if self.is_leaf():
            if tree is self:
                return 0
            else:
                return None
        else:
            subtree = self._point_position(tree._centre)[0]
            if subtree:
                dep = subtree._help_depth(tree)
                if dep is not None:
                    return 1 + dep
def _help_depth ( self , tree : QuadTree ) -> Optional [ int ] : if self . is_leaf ( ) : if tree is self : return 0 else : return None else : subtree = self . _point_position ( tree . _centre ) [ 0 ] if subtree : dep = subtree . _help_depth ( tree ) if dep is not None : return 1 + dep
Return the depth of the subtree <tree> relative to <self>.
Return the depth of the subtree <tree > relative to <self > .
"""
        Return the depth of the subtree <tree> relative to <self>. Return
        None if <tree> is not a descendant of <self>,  if <tree> is <self>
        return 0.
        === Precondition ===
        - This function is only called to the trees other than the root
        QuadTree.
        """
self
tree
QuadTree