code: def test_invalid_call(path=None):
      with chpwd(path):
          # ^ Change directory so that we don't fail with an
          # InvalidGitRepositoryError if the test is executed from a git
          # worktree.
  
          # needs a SSH URL
          assert_raises(InsufficientArgumentsError, create_sibling, "")
          assert_raises(ValueError, create_sibling, "http://ignore.me")
          # needs an actual dataset
          assert_raises(
              ValueError,
              create_sibling,
              "datalad-test:/tmp/somewhere",
              dataset="/nothere",
          )
      # pre-configure a bogus remote
      ds = Dataset(path).create()
      ds.repo.add_remote("bogus", "http://bogus.url.com")
      # fails to reconfigure by default with generated
      # and also when given an existing name
      for res in (
          ds.create_sibling(
              "bogus:/tmp/somewhere", on_failure="ignore"
          ),
          ds.create_sibling(
              "datalad-test:/tmp/somewhere",
              name="bogus",
              on_failure="ignore",
          ),
      ):
          assert_result_count(
              res,
              1,
              status="error",
              message=(
                  "sibling '%s' already configured (specify alternative name, or force reconfiguration via --existing",
                  "bogus",
              ),
          )
  
      if not have_webui():
          # need an extension package
          assert_raises(RuntimeError, ds.create_sibling, "", ui=True)
  
imports: import logging
  import os
  import stat
  import sys
  from os import chmod
  from os.path import basename, exists
  from os.path import join
  import pytest
  from datalad.api import create_sibling, install, push
  from datalad.cmd import StdOutErrCapture
  from datalad.cmd import WitlessRunner
  from datalad.distribution.create_sibling import _RunnerAdapter
  from datalad.support.annexrepo import AnnexRepo
  from datalad.support.exceptions import CommandError, InsufficientArgumentsError
  from datalad.support.gitrepo import GitRepo
  from datalad.support.network import urlquote
  from datalad.tests.utils_testdatasets import _mk_submodule_annex
  from datalad.tests.utils_pytest import DEFAULT_BRANCH, DEFAULT_REMOTE, SkipTest, assert_dict_equal, assert_false, assert_in, assert_in_results, assert_no_errors_logged, assert_not_equal, assert_not_in, assert_raises, assert_repo_status, assert_result_count, assert_status, create_tree, eq_, get_mtimes_and_digests, get_ssh_port, known_failure_windows, ok_, ok_endswith, ok_file_has_content, ok_file_under_git, skip_if_on_windows, skip_if_root, skip_ssh, slow, swallow_logs, with_tempfile, with_testsui
  from datalad.utils import Path, _path_, chpwd, on_windows
  from ..dataset import Dataset
label_desc: Use image node_id 3 for calling a global function with example usage: test_invalid_call(path) without return types