code: def test_show_markdown_with_hash(capsys):
      diff = {
          "deleted": [
              {"path": "zoo", "hash": "22222"},
              {
                  "path": os.path.join("data", ""),
                  "hash": "XXXXXXXX.dir",
              },
              {"path": os.path.join("data", "foo"), "hash": "11111111"},
              {"path": os.path.join("data", "bar"), "hash": "00000000"},
          ],
          "modified": [
              {
                  "path": "file",
                  "hash": {"old": "AAAAAAAA", "new": "BBBBBBBB"},
              }
          ],
          "added": [{"path": "file", "hash": "00000000"}],
          "renamed": [
              {
                  "path": {"old": "file_old", "new": "file_new"},
                  "hash": "11111111",
              }
          ],
          "not in cache": [{"path": "file2", "hash": "12345678"}],
      }
  
      _show_markdown(diff, show_hash=True)
  
      out, _ = capsys.readouterr()
      assert out == (
          "| Status       | Hash               | Path                 |\n"
          "|--------------|--------------------|----------------------|\n"
          "| added        | 00000000           | file                 |\n"
          "| deleted      | 22222              | zoo                  |\n"
          f"| deleted      | XXXXXXXX           | data{os.path.sep}                |\n"
          f"| deleted      | 11111111           | data{os.path.sep}foo             |\n"
          f"| deleted      | 00000000           | data{os.path.sep}bar             |\n"
          "| renamed      | 11111111           | file_old -> file_new |\n"
          "| modified     | AAAAAAAA..BBBBBBBB | file                 |\n"
          "| not in cache | 12345678           | file2                |\n"
          "\n"
      )
  
file_path: dvc/tests/unit/command/test_diff.py
imports: import collections
  import os
  import pytest
  from dvc.cli import parse_args
  from dvc.commands.diff import _digest, _show_markdown
label_desc: Use image node_id 10 for calling a global function with example usage: test_show_markdown_with_hash(capsys) without return types