code: def table(
      data,
      cols,
      sort=None,
      detail=None,
      detail_cb=None,
      indent=0,
      err=False,
      max_width_adj=0,
      file=None,
      **style_kw,
  ):
      data = sorted(data, key=_table_row_sort_key(sort))
      formatted = _format_table_data(data, cols + (detail or []))
      col_info = _col_info(formatted, cols)
      if sys.stdout.isatty():
          max_width = _max_width() + max_width_adj
      else:
          max_width = None
      for formatted_item, data_item in zip(formatted, data):
          _table_item_out(
              formatted_item,
              data_item,
              cols,
              col_info,
              detail,
              detail_cb,
              indent,
              max_width,
              err,
              file,
              style_kw,
          )
  
imports: import functools
  import logging
  import os
  import sys
  import shutil
  import typing
  import click
  from guild import ansi_util
  from guild import config
label_desc: Use image node_id 10 for calling a global function with example usage: table(data, cols, sort, detail, detail_cb, indent, err, max_width_adj, file) without return types