code: def test_create_alias(ds_path=None, ria_path=None, clone_path=None):
      ds_path = Path(ds_path)
      clone_path = Path(clone_path)
  
      ds_path.mkdir()
      dsa = Dataset(ds_path / "a").create()
  
      res = dsa.create_sibling_ria(
          url="ria+file://{}".format(ria_path),
          name="origin",
          alias="ds-a",
          new_store_ok=True,
      )
      assert_result_count(
          res, 1, status="ok", action="create-sibling-ria"
      )
  
      ds_clone = clone(
          source="ria+file://{}#~ds-a".format(ria_path),
          path=clone_path / "a",
      )
      assert_repo_status(ds_clone.path)
  
      # multiple datasets in a RIA store with different aliases work
      dsb = Dataset(ds_path / "b").create()
  
      res = dsb.create_sibling_ria(
          url="ria+file://{}".format(ria_path),
          name="origin",
          alias="ds-b",
          new_store_ok=True,
      )
      assert_result_count(
          res, 1, status="ok", action="create-sibling-ria"
      )
  
      ds_clone = clone(
          source="ria+file://{}#~ds-b".format(ria_path),
          path=clone_path / "b",
      )
      assert_repo_status(ds_clone.path)
  
      # second dataset in a RIA store with the same alias emits a warning
      dsc = Dataset(ds_path / "c").create()
  
      with swallow_logs(logging.WARNING) as cml:
          res = dsc.create_sibling_ria(
              url="ria+file://{}".format(ria_path),
              name="origin",
              alias="ds-a",
              new_store_ok=True,
          )
          assert_in(
              "Alias 'ds-a' already exists in the RIA store, not adding an alias",
              cml.out,
          )
      assert_result_count(
          res, 1, status="ok", action="create-sibling-ria"
      )
  
file_path: datalad/datalad/distributed/tests/test_create_sibling_ria.py
imports: import logging
  import os.path
  from functools import wraps
  from unittest.mock import patch
  from datalad import cfg
  from datalad.api import Dataset, clone
  from datalad.support.network import get_local_file_url
  from datalad.tests.utils_pytest import assert_false, assert_in, assert_raises, assert_repo_status, assert_result_count, assert_status, attr, chpwd, eq_, known_failure_githubci_win, ok_exists, skip_if_on_windows, skip_ssh, skip_wo_symlink_capability, slow, swallow_logs, with_tempfile, with_tree
  from datalad.utils import Path
label_desc: Use image node_id 6 for calling a global function with example usage: test_create_alias(ds_path, ria_path, clone_path) without return types