code: def _test_initremote_alias(host, ds_path, store):
      ds_path = Path(ds_path)
      store = Path(store)
      ds = Dataset(ds_path).create()
      populate_dataset(ds)
  
      if host:
          url = "ria+ssh://{host}{path}".format(host=host, path=store)
      else:
          url = "ria+{}".format(store.as_uri())
      init_opts = common_init_opts + ["url={}".format(url)]
  
      # set up store:
      io = SSHRemoteIO(host) if host else LocalIO()
      create_store(io, store, "1")
      # set up the dataset with alias
      create_ds_in_store(io, store, ds.id, "2", "1", "ali")
      ds.repo.init_remote("ria-remote", options=init_opts)
      assert_in(
          "ria-remote",
          [
              cfg["name"]
              for uuid, cfg in ds.repo.get_special_remotes().items()
          ],
      )
      assert_repo_status(ds.path)
      assert_true(io.exists(store / "alias" / "ali"))
  
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 6 for calling a global function with example usage: _test_initremote_alias(host, ds_path, store) without return types