code: def test_verify_hashes(
      tmp_dir, scm, dvc, mocker, tmp_path_factory, local_remote
  ):
      tmp_dir.dvc_gen({"file": "file1 content"}, commit="add file")
      tmp_dir.dvc_gen(
          {"dir": {"subfile": "file2 content"}}, commit="add dir"
      )
      dvc.push()
  
      # remove artifacts and cache to trigger fetching
      remove("file")
      remove("dir")
      dvc.cache.local.clear()
  
      hash_spy = mocker.spy(dvc_data.hashfile.hash, "file_md5")
  
      dvc.pull()
      # NOTE: 2 are for index.data_tree building
      assert hash_spy.call_count == 3
  
      # Removing cache will invalidate existing state entries
      dvc.cache.local.clear()
  
      with dvc.config.edit() as conf:
          conf["remote"]["upstream"]["verify"] = True
  
      dvc.pull()
      assert hash_spy.call_count == 10
  
imports: import logging
  import os
  import shutil
  import pytest
  from flaky.flaky_decorator import flaky
  import dvc_data
  from dvc.cli import main
  from dvc.exceptions import CheckoutError
  from dvc.repo.open_repo import clean_repos
  from dvc.stage.exceptions import StageNotFound
  from dvc.testing.remote_tests import TestRemote
  from dvc.utils.fs import remove
  from dvc_data.hashfile.db import HashFileDB
  from dvc_data.hashfile.db.local import LocalHashFileDB
  from dvc_data.hashfile.hash_info import HashInfo
label_desc: Use image node_id 6 for calling a global function with example usage: test_verify_hashes(tmp_dir, scm, dvc, mocker, tmp_path_factory, local_remote) without return types