code: def print_tree(self, maxresults=100, maxdepth=None):
          
          self.ignore_caller()
          for depth, refid, rep in self.walk(maxresults, maxdepth):
              print(("%9d" % refid), (" " * depth * 2), rep)
docs: Walk the object tree, pretty-printing each branch.