code: def test_copy_file_recursion(srcdir=None, destdir=None):
      src_ds = Dataset(srcdir).create(force=True)
      src_ds.save()
      dest_ds = Dataset(destdir).create()
      copy_file(
          [src_ds.pathobj / "subdir", dest_ds.pathobj], recursive=True
      )
      # structure is mirrored
      ok_file_has_content(dest_ds.pathobj / "subdir" / "file1", "123")
      ok_file_has_content(dest_ds.pathobj / "subdir" / "file2", "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 5 for calling a global function with example usage: test_copy_file_recursion(srcdir, destdir) without return types