code: def test_diff_table_precision():
      diff = {
          "metrics.json": {
              "a.b.c": {"old": 1.1234, "new": 2.2345, "diff": 3.3456}
          }
      }
      td = diff_table(diff, title="Metric", precision=3)
      assert td.as_dict() == [
          {
              "Path": "metrics.json",
              "Metric": "a.b.c",
              "HEAD": "1.12",
              "workspace": "2.23",
              "Change": "3.35",
          }
      ]
  
imports: import textwrap
  import pytest
  from dvc.compare import diff_table, metrics_table, show_diff, show_metrics
  from dvc.utils.serialize import YAMLFileCorruptedError
label_desc: Use image node_id 5 for calling a global function with example usage: test_diff_table_precision() without return types