code: def print_matrix(self, format=None, output=sys.stdout, depth=0, **kwargs):
          
          matrix = self.as_matrix(depth=depth)
          matrix.print(format=format, output=output, **kwargs)
docs: Print the matrix for self's nodes.
  
          Args:
              format (str): output format (csv, json or text).
              output (file): file descriptor on which to write.
              depth (int): depth of the matrix.