code: def test_gc_logging(caplog, dvc, good_and_bad_cache):
      with caplog.at_level(logging.INFO, logger="dvc"):
          dvc.gc(workspace=True)
  
      assert "Removed 3 objects from repo cache." in caplog.text
      assert "No unused 'local' cache to remove." in caplog.text
      assert "No unused 'legacy' cache to remove." in caplog.text
  
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 27 for calling a global function with example usage: test_gc_logging(caplog, dvc, good_and_bad_cache) without return types