code: def _tensor_str_with_formatter(self, indent, summarize, formatter):
      dim = self.dim()
      # dim = self.ndim()
  
      # if dim == 0:
      #     return _scalar_str(self, formatter)
  
      if dim == 1:
          return _vector_str(self, indent, summarize, formatter)
  
      # Preventing the entire tensor from being displayed to the terminal.
      # We (figuratively) "prune" the tensor for output
      if summarize and self.size_dim(0) > 2 * PRINT_OPTS.edgeitems:
          slices = (
              [
                  _tensor_str_with_formatter(
                      self[i], indent + 1, summarize, formatter
                  )
                  for i in range(0, PRINT_OPTS.edgeitems)
              ]
              + ["..."]
              + [
                  _tensor_str_with_formatter(
                      self[i], indent + 1, summarize, formatter
                  )
                  for i in range(
                      len(self) - PRINT_OPTS.edgeitems, len(self)
                  )
              ]
          )
  
      # If tensor is small enough to display to terminal
      else:
          slices = [
              _tensor_str_with_formatter(
                  self[i], indent + 1, summarize, formatter
              )
              for i in range(0, self.size_dim(0))
          ]
  
      tensor_str = ("," + "\n" * (dim - 1) + " " * (indent + 1)).join(
          slices
      )
      return "[" + tensor_str + "]"
  
file_path: caer/caer/coreten/_tensor_str.py
imports: import math
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: _tensor_str_with_formatter(indent, summarize, formatter) and returns: unknown, _vector_str