code: def test_import_url_to_dir(dname, tmp_dir, dvc):
      tmp_dir.gen({"data_dir": {"file": "file content"}})
      src = os.path.join("data_dir", "file")
  
      os.makedirs(dname, exist_ok=True)
  
      stage = dvc.imp_url(src, dname)
  
      dst = tmp_dir / dname / "file"
  
      assert stage.outs[0].fs_path == os.fspath(dst)
      assert os.path.isdir(dname)
      assert dst.read_text() == "file content"
  
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 6 for calling a global function with example usage: test_import_url_to_dir(dname, tmp_dir, dvc) without return types