code: def test_collect_with_not_existing_output_or_stage_name(
      tmp_dir, dvc, run_copy
  ):
      with pytest.raises(StageFileDoesNotExistError):
          dvc.stage.collect("some_file")
      tmp_dir.dvc_gen("foo", "foo")
      run_copy("foo", "bar", name="copy-foo-bar")
      with pytest.raises(StageNotFound):
          dvc.stage.collect("some_file")
  
imports: import os
  from operator import itemgetter
  import pytest
  from funcy import raiser
  from dvc.dvcfile import PROJECT_FILE, FileIsGitIgnored
  from dvc.exceptions import NoOutputOrStageError
  from dvc.repo import Repo
  from dvc.stage.exceptions import StageFileDoesNotExistError, StageNameUnspecified, StageNotFound
  from dvc.utils import relpath
  from dvc.utils.fs import remove
  from dvc.utils.strictyaml import YAMLValidationError
label_desc: Use image node_id 3 for calling a global function with example usage: test_collect_with_not_existing_output_or_stage_name(tmp_dir, dvc, run_copy) without return types