code: def test_diff_sorted():
      td = diff_table(
          {
              "metrics.yaml": {
                  "x.b": {"old": 5, "new": 6, "diff": 1},
                  "a.d.e": {"old": 3, "new": 4, "diff": 1},
                  "a.b.c": {"old": 1, "new": 2, "diff": 1},
              }
          },
          "Metric",
      )
      assert list(td) == [
          ["metrics.yaml", "a.b.c", "1", "2", "1"],
          ["metrics.yaml", "a.d.e", "3", "4", "1"],
          ["metrics.yaml", "x.b", "5", "6", "1"],
      ]
  
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 10 for calling a global function with example usage: test_diff_sorted() without return types