code: def test_copy_file_datalad_specialremote(
      workdir=None, webdir=None, weburl=None
  ):
      workdir = Path(workdir)
      src_ds = Dataset(workdir / "src").create()
      # enable datalad special remote
      src_ds.repo.init_remote(
          DATALAD_SPECIAL_REMOTE,
          [
              "encryption=none",
              "type=external",
              "externaltype={}".format(DATALAD_SPECIAL_REMOTE),
              "autoenable=true",
          ],
      )
      # put files into the dataset by URL
      src_ds.download_url(
          "/".join((weburl, "webfile1")), path="myfile1.txt"
      )
      src_ds.download_url(
          "/".join((weburl, "webfile2")), path="myfile2.txt"
      )
      # approx test that the file is known to a remote
      # that is not the web remote
      assert_in_results(
          src_ds.repo.whereis("myfile1.txt", output="full").values(),
          here=False,
          description="[{}]".format(DATALAD_SPECIAL_REMOTE),
      )
      # now a new dataset
      dest_ds = Dataset(workdir / "dest").create()
      # no special remotes
      eq_(dest_ds.repo.get_special_remotes(), {})
      # must call with a dataset to get change saved, in order for drop
      # below to work properly without getting in reckless mode
      dest_ds.copy_file(
          [src_ds.pathobj / "myfile1.txt", dest_ds.pathobj]
      )
      # we have an special remote in the destination dataset now
      assert_in_results(
          dest_ds.repo.get_special_remotes().values(),
          externaltype=DATALAD_SPECIAL_REMOTE,
      )
      # and it works
      dest_ds.drop("myfile1.txt")
      dest_ds.repo.get("myfile1.txt", remote="datalad")
      ok_file_has_content(dest_ds.pathobj / "myfile1.txt", "123")
  
      # now replace file in dest with a different content at the same path
      # must call with a dataset to get change saved, in order for drop
      dest_ds.copy_file(
          [
              src_ds.pathobj / "myfile2.txt",
              dest_ds.pathobj / "myfile1.txt",
          ]
      )
      dest_ds.drop("myfile1.txt")
      dest_ds.repo.get("myfile1.txt", remote="datalad")
      # no gets the "same path" but yields different content
      ok_file_has_content(dest_ds.pathobj / "myfile1.txt", "abc")
  
file_path: datalad/datalad/local/tests/test_copy_file.py
imports: from os.path import join
  from datalad.api import copy_file
  from datalad.consts import DATALAD_SPECIAL_REMOTE
  from datalad.distribution.dataset import Dataset
  from datalad.tests.utils_pytest import assert_in_results, assert_raises, assert_repo_status, assert_status, chpwd, eq_, nok_, ok_, ok_file_has_content, serve_path_via_http, slow, with_tempfile, with_tree
  from datalad.utils import Path
label_desc: Use image node_id 3 for calling a global function with example usage: test_copy_file_datalad_specialremote(workdir, webdir, weburl) without return types