code: def test_sync__download_grids(parse_args_mock, tmp_path, capsys):
      parse_args_mock.return_value = argparse.Namespace(
          bbox=None,
          list_files=False,
          file="us_noaa_alaska",
          all=False,
          source_id=None,
          area_of_use=None,
          verbose=True,
          target_directory=str(tmp_path),
          system_directory=False,
          spatial_test="intersects",
          exclude_world_coverage=False,
          include_already_downloaded=False,
      )
      main()
      captured = capsys.readouterr()
      paths = sorted(
          Path(path).name for path in glob(str(tmp_path.joinpath("*")))
      )
      if grids_available("us_noaa_alaska.tif", check_network=False):
          assert paths == ["files.geojson"]
          assert captured.out == ""
      else:
          assert paths == ["files.geojson", "us_noaa_alaska.tif"]
          assert (
              captured.out
              == "Downloading: https://cdn.proj.org/us_noaa_alaska.tif\n"
          )
      # make sure not downloaded again
      with proj_env():
          append_data_dir(str(tmp_path))
          main()
          captured = capsys.readouterr()
          assert captured.out == ""
  
imports: import argparse
  import os
  import subprocess
  import sys
  from glob import glob
  from pathlib import Path
  from unittest.mock import patch
  import pytest
  from pyproj.__main__ import main
  from pyproj.datadir import append_data_dir, get_data_dir, get_user_data_dir
  from pyproj.sync import _load_grid_geojson
  from test.conftest import grids_available, proj_env, tmp_chdir
label_desc: Use image node_id 14 for calling a global function with example usage: test_sync__download_grids(parse_args_mock, tmp_path, capsys) without return types