code: def _vector_str(self, indent, summarize, formatter):
      # length includes spaces and comma between elements
      element_length = formatter.width() + 2
  
      elements_per_line = max(
          1,
          int(
              math.floor(
                  (PRINT_OPTS.linewidth - indent) / (element_length)
              )
          ),
      )
      char_per_line = element_length * elements_per_line
  
      def _val_formatter(val, formatter=formatter):
          return formatter.format(val)
  
      # 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:
          data = (
              [
                  _val_formatter(val)
                  for val in self[: PRINT_OPTS.edgeitems].tolist()
              ]
              + [" ..."]
              + [
                  _val_formatter(val)
                  for val in self[-PRINT_OPTS.edgeitems :].tolist()
              ]
          )
      else:
          data = [_val_formatter(val) for val in self.tolist()]
  
      data_lines = [
          data[i : i + elements_per_line]
          for i in range(0, len(data), elements_per_line)
      ]
      lines = [", ".join(line) for line in data_lines]
  
      return "[" + ("," + "\n" + " " * (indent + 1)).join(lines) + "]"
  
file_path: caer/caer/coreten/_tensor_str.py
imports: import math
  import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: _vector_str(indent, summarize, formatter) and returns: unknown, formatter