code: def test_download_resource_file(
      urlretrieve_mock, verbose, tmp_path, capsys
  ):
      def dummy_urlretrieve(url, local_path):
          with open(local_path, "w") as testf:
              testf.write("TEST")
  
      urlretrieve_mock.side_effect = dummy_urlretrieve
      _download_resource_file(
          file_url="test_url",
          short_name="test_file.txt",
          directory=tmp_path,
          verbose=verbose,
          sha256="94ee059335e587e501cc4bf90613e0814f00a7b08bc7c648fd865a2af6a22cc2",
      )
      urlretrieve_mock.assert_called_with(
          "test_url", tmp_path / "test_file.txt.part"
      )
      captured = capsys.readouterr()
      if not verbose:
          assert captured.out == ""
      else:
          assert captured.out == "Downloading: test_url\n"
      expected_file = tmp_path / "test_file.txt"
      assert expected_file.exists()
      assert (
          _sha256sum(expected_file)
          == "94ee059335e587e501cc4bf90613e0814f00a7b08bc7c648fd865a2af6a22cc2"
      )
  
file_path: pyproj/test/test_sync.py
imports: from datetime import datetime, timedelta
  from unittest.mock import MagicMock, patch
  from urllib.error import URLError
  import pytest
  from pyproj.aoi import BBox
  from pyproj.sync import _download_resource_file, _load_grid_geojson, _sha256sum, get_transform_grid_list
label_desc: Use image node_id 9 for calling a global function with example usage: test_download_resource_file(urlretrieve_mock, verbose, tmp_path, capsys) without return types