code: def test_failed_import_url(mocker, caplog, dvc):
      cli_args = parse_args(
          ["import-url", "http://somesite.com/file_name"]
      )
      assert cli_args.func == CmdImportUrl
  
      cmd = cli_args.func(cli_args)
      mocker.patch.object(
          cmd.repo, "imp_url", side_effect=DvcException("error")
      )
      with caplog.at_level(logging.ERROR, logger="dvc"):
          assert cmd.run() == 1
          expected_error = (
              "failed to import http://somesite.com/file_name. "
              "You could also try downloading it manually, and "
              "adding it with `dvc add`."
          )
          assert expected_error in caplog.text
  
file_path: dvc/tests/unit/command/test_imp_url.py
imports: import logging
  import pytest
  from dvc.cli import parse_args
  from dvc.commands.imp_url import CmdImportUrl
  from dvc.exceptions import DvcException
label_desc: Use image node_id 2 for calling a global function with example usage: test_failed_import_url(mocker, caplog, dvc) without return types