code: def print_table(
      headers: list[str],
      columns: list[list[str]],
      order: list[int] | None = None,
  ):
      """Pretty-prints a table.
  
      Parameters
      ----------
      headers
          The column names.
      columns
          The column values.
      order
          Order in which to print the column the values. Defaults to the order in which the values
          are given.
  
      """
  
      # Check inputs
      if len(headers) != len(columns):
          raise ValueError("there must be as many headers as columns")
  
      if len(set(map(len, columns))) > 1:
          raise ValueError("all the columns must be of the same length")
  
      # Determine the width of each column based on the maximum length of it's elements
      col_widths = [
          max(max(map(len, col)), len(header))
          for header, col in zip(headers, columns)
      ]
  
      # Make a template to print out rows one by one
      row_format = " ".join(
          ["{:" + str(width + 2) + "s}" for width in col_widths]
      )
  
      # Determine the order in which to print the column values
      if order is None:
          order = list(range(len(columns[0])))
  
      # Build the table
      table = (
          row_format.format(*headers)
          + "\n"
          + "\n".join(
              row_format.format(
                  *[
                      col[i].rjust(width)
                      for col, width in zip(columns, col_widths)
                  ]
              )
              for i in order
          )
      )
  
      return table
  
label_desc: Use image node_id 1 for calling a global function with example usage: print_table(headers, columns, order) and returns: table