code: def test_diff_show_markdown_and_hash(mocker, show_hash, dvc):
      options = ["diff", "--md"] + (
          ["--show-hash"] if show_hash else []
      )
      args = parse_args(options)
      cmd = args.func(args)
  
      diff = {}
      show_hash = show_hash if show_hash else False
      mock_show_markdown = mocker.patch(
          "dvc.commands.diff._show_markdown"
      )
      mocker.patch("dvc.repo.Repo.diff", return_value=diff.copy())
  
      assert cmd.run() == 0
      mock_show_markdown.assert_called_once_with(diff, show_hash, False)
  
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 7 for calling a global function with example usage: test_diff_show_markdown_and_hash(mocker, show_hash, dvc) without return types