code: def test_ignore_in_collected_dir_error_is_logged(
      tmp_dir, caplog, mocker
  ):
      error = IgnoreInCollectedDirError(".dvcignore", "dir")
      mocker.patch(
          "dvc.cli.parse_args",
          return_value=Namespace(
              func=raiser(error),
              quiet=False,
              verbose=True,
          ),
      )
      assert main() == 255
      expected = (
          ".dvcignore file should not be in collected dir path: 'dir'"
      )
      assert expected in caplog.text
  
file_path: dvc/tests/unit/cli/test_main.py
imports: from argparse import Namespace
  import pytest
  from funcy import raiser
  from dvc.cli import main
  from dvc_data.hashfile.build import IgnoreInCollectedDirError
  from dvc_data.hashfile.cache import DiskError
  from dvc_objects.fs.base import FileSystem, RemoteMissingDepsError
label_desc: Use image node_id 3 for calling a global function with example usage: test_ignore_in_collected_dir_error_is_logged(tmp_dir, caplog, mocker) without return types