code: def diff_table(
      diff,
      title: str,
      old: bool = True,
      no_path: bool = False,
      show_changes: bool = True,
      precision: Optional[int] = None,
      round_digits: bool = False,
      on_empty_diff: Optional[str] = None,
      a_rev: Optional[str] = None,
      b_rev: Optional[str] = None,
  ) -> TabularData:
      a_rev = a_rev or "HEAD"
      b_rev = b_rev or "workspace"
      headers: List[str] = ["Path", title, a_rev, b_rev, "Change"]
      fill_value = "-"
      td = TabularData(headers, fill_value=fill_value)
  
      for fname, diff_in_file in diff.items():
          for item, change in sorted(diff_in_file.items()):
              old_value = with_value(change.get("old"), fill_value)
              new_value = with_value(change.get("new"), fill_value)
              diff_value = with_value(
                  change.get("diff", on_empty_diff), fill_value
              )
              td.append(
                  [
                      fname,
                      str(item),
                      _format_field(old_value, precision, round_digits),
                      _format_field(new_value, precision, round_digits),
                      _format_field(
                          diff_value, precision, round_digits
                      ),
                  ]
              )
  
      if no_path:
          td.drop("Path")
  
      if not show_changes:
          td.drop("Change")
  
      if not old:
          td.drop(a_rev)
          td.rename(b_rev, "Value")
  
      return td
  
imports: from collections import abc
  from itertools import chain, repeat, zip_longest
  from operator import itemgetter
  from typing import TYPE_CHECKING, Any, Dict, ItemsView, Iterable, Iterator, List, Mapping, MutableSequence, Optional, Sequence, Set, Tuple, Union, overload
  from funcy import reraise
label_desc: Use image node_id 4 for calling a global function with example usage: diff_table(diff, title, old, no_path, show_changes, precision, round_digits, on_empty_diff, a_rev, b_rev) and returns: td