code: def has_parent_object(self, dir_object):
          
          obj = self
          while obj:
              if obj == dir_object:
                  return True
              obj = obj.parent_dir
          return False
docs: Return `True` if dir_object is a direct or indirect parent
          directory, or if both are the same object.