code: def test_should_remove_outs_before_import(
      tmp_dir, dvc, mocker, erepo_dir
  ):
      erepo_dir.gen({"foo": "foo"})
  
      remove_outs_call_counter = mocker.spy(Stage, "remove_outs")
      ret = main(["import-url", os.fspath(erepo_dir / "foo")])
  
      assert ret == 0
      assert remove_outs_call_counter.mock.call_count == 1
  
imports: import os
  import textwrap
  from uuid import uuid4
  import pytest
  from dvc.cli import main
  from dvc.dependency.base import Dependency, DependencyDoesNotExistError
  from dvc.dvcfile import load_file
  from dvc.exceptions import InvalidArgumentError
  from dvc.stage import Stage
  from dvc.testing.workspace_tests import TestImport
  from tests.utils import get_gitignore_content
label_desc: Use image node_id 4 for calling a global function with example usage: test_should_remove_outs_before_import(tmp_dir, dvc, mocker, erepo_dir) without return types