code: def test_gc_not_in_remote(tmp_dir, scm, dvc, mocker, local_remote):
      (standalone, dir1, dir2) = tmp_dir.dvc_gen(
          {
              "file1": "standalone",
              "dir1": {"file2": "file2"},
              "dir2": {"file3": "file3", "file4": "file4"},
          }
      )
      mocked_remove = mocker.spy(LocalFileSystem, "remove")
      dvc.gc(workspace=True)
      assert not mocked_remove.call_args_list
  
      dvc.push(["file1", "dir1"])
  
      dvc.gc(workspace=True, not_in_remote=True)
  
      assert len(mocked_remove.mock_calls) == 3
  
      arg_list = mocked_remove.call_args_list
  
      standalone_hash = standalone.outs[0].hash_info.value
      dir1_hash = dir1.outs[0].hash_info.value
      assert f"{dir1_hash[2:]}.unpacked" in arg_list[0][0][1]
      assert f"{dir1_hash[2:]}" in arg_list[1][0][1][0]
      # We expect 2 calls: standalone_hash and dir1/file2/file2
      assert len(arg_list[2][0][1]) == 2
      # Order is not guaranteed here.
      assert (
          f"{standalone_hash[2:]}" in arg_list[2][0][1][0]
          or f"{standalone_hash[2:]}" in arg_list[2][0][1][1]
      )
  
imports: import datetime
  import logging
  import os
  import shutil
  import textwrap
  import pytest
  from dvc.cli import main
  from dvc.exceptions import CollectCacheError, InvalidArgumentError, RevCollectionError
  from dvc.fs import LocalFileSystem
  from dvc.utils.fs import remove
  from dvc_data.hashfile.db.local import LocalHashFileDB
label_desc: Use image node_id 21 for calling a global function with example usage: test_gc_not_in_remote(tmp_dir, scm, dvc, mocker, local_remote) without return types