code: def _test_binary_data(host, store, dspath):
      # make sure, special remote deals with binary data and doesn't
      # accidentally involve any decode/encode etc.
  
      dspath = Path(dspath)
      store = Path(store)
  
      url = "https://github.com/datalad/example-dicom-functional/blob/master/dicoms/MR.1.3.46.670589.11.38317.5.0.4476.2014042516042547586"
      file = "dicomfile"
      ds = Dataset(dspath).create()
      ds.download_url(
          url, path=file, message="Add DICOM file from github"
      )
      assert_repo_status(ds.path)
  
      # set up store:
      io = SSHRemoteIO(host) if host else LocalIO()
      if host:
          store_url = "ria+ssh://{host}{path}".format(
              host=host, path=store
          )
      else:
          store_url = "ria+{}".format(store.as_uri())
  
      create_store(io, store, "1")
      create_ds_in_store(io, store, ds.id, "2", "1")
  
      # add special remote
      init_opts = common_init_opts + ["url={}".format(store_url)]
      ds.repo.init_remote("store", options=init_opts)
  
      # actual data transfer (both directions)
      # Note, that we intentionally call annex commands instead of
      # datalad-publish/-get here. We are testing an annex-special-remote.
  
      store_uuid = ds.siblings(
          name="store", return_type="item-or-list"
      )["annex-uuid"]
      here_uuid = ds.siblings(name="here", return_type="item-or-list")[
          "annex-uuid"
      ]
  
      known_sources = ds.repo.whereis(str(file))
      assert_in(here_uuid, known_sources)
      assert_not_in(store_uuid, known_sources)
      ds.repo.call_annex(["move", str(file), "--to", "store"])
      known_sources = ds.repo.whereis(str(file))
      assert_not_in(here_uuid, known_sources)
      assert_in(store_uuid, known_sources)
      ds.repo.call_annex(["get", str(file), "--from", "store"])
      known_sources = ds.repo.whereis(str(file))
      assert_in(here_uuid, known_sources)
      assert_in(store_uuid, known_sources)
  
imports: import logging
  import stat
  from datalad.api import Dataset, clone, create_sibling_ria
  from datalad.cmd import NoCapture
  from datalad.customremotes.ria_utils import create_ds_in_store, create_store, get_layout_locations
  from datalad.distributed.ora_remote import LocalIO, SSHRemoteIO, _sanitize_key
  from datalad.distributed.tests.ria_utils import common_init_opts, get_all_files, populate_dataset
  from datalad.support.exceptions import CommandError, IncompleteResultsError
  from datalad.tests.utils_pytest import SkipTest, assert_equal, assert_false, assert_in, assert_not_in, assert_raises, assert_repo_status, assert_status, assert_true, has_symlink_capability, known_failure_windows, serve_path_via_http, skip_if_adjusted_branch, skip_if_no_network, skip_if_root, skip_ssh, skip_wo_symlink_capability, slow, swallow_logs, turtle, with_tempfile
  from datalad.utils import Path
label_desc: Use image node_id 19 for calling a global function with example usage: _test_binary_data(host, store, dspath) without return types