code: def test_gc_multiple_dvc_repos(tmp_dir, scm, dvc, erepo_dir):
      tmp_dir.dvc_gen("only_in_first", "only in main repo")
      tmp_dir.dvc_gen("in_both", "in both repos")
  
      erepo_dir.dvc.cache.local.path = dvc.cache.local.path
      with erepo_dir.chdir():
          erepo_dir.dvc_gen("in_both", "in both repos")
          erepo_dir.dvc_gen("only_in_second", "only in additional repo")
  
      odb = dvc.cache.local
      assert len(list(odb.all())) == 3
  
      dvc.gc(repos=[erepo_dir], workspace=True)
      assert len(list(odb.all())) == 3
  
      dvc.gc(workspace=True)
      assert len(list(odb.all())) == 2
  
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 5 for calling a global function with example usage: test_gc_multiple_dvc_repos(tmp_dir, scm, dvc, erepo_dir) without return types