code: def _format_line(headers, fields):
      """Format a line of a table.
  
      Arguments:
        headers: A list of strings that are used as the table headers.
        fields: A list of the same length as `headers` where `fields[i]` is
          the entry for `headers[i]` in this row. Elements can be of
          arbitrary types. Pass `headers` to print the header row.
  
      Returns:
        A pretty string.
      """
      assert len(fields) == len(headers), (fields, headers)
      fields = [
          "%2.4f" % field if isinstance(field, float) else str(field)
          for field in fields
      ]
      return "  ".join(
          " " * max(0, len(header) - len(field)) + field
          for (header, field) in zip(headers, fields)
      )
  
file_path: tensorboard/tensorboard/encode_png_benchmark.py
imports: import datetime
  import threading
  import time
  from absl import app
  from absl import logging
  import numpy
  from tensorboard.util import encoder
  from tensorboard.util import tb_logging
label_desc: Use image node_id 3 for calling a global function with example usage: _format_line(headers, fields) and returns: str