class_docstr: Create a dataset sibling on a UNIX-like Shell (local or SSH)-accessible machine
  
  Given a local dataset, and a path or SSH login information this command
  creates a remote dataset repository and configures it as a dataset sibling
  to be used as a publication target (see `publish` command).
  
  Various properties of the remote sibling can be configured (e.g. name
  location on the server, read and write access URLs, and access
  permissions.
  
  Optionally, a basic web-viewer for DataLad datasets can be installed
  at the remote location.
  
  This command supports recursive processing of dataset hierarchies, creating
  a remote sibling for each dataset in the hierarchy. By default, remote
  siblings are created in hierarchical structure that reflects the
  organization on the local file system. However, a simple templating
  mechanism is provided to produce a flat list of datasets (see
  --target-dir).
docstr: A little helper to get url from pushurl or from url if not defined
docstr_tok: ["A","little","helper","to","get","url","from","pushurl","or","from","url","if","not","defined"]
code: def _get_remote_url(ds, name):
      """A little helper to get url from pushurl or from url if not defined"""
      # take pushurl if present, if not -- just a url
      url = ds.config.get("remote.%s.pushurl" % name) or ds.config.get(
          "remote.%s.url" % name
      )
      if not url:
          raise ValueError(
              "%s had neither pushurl or url defined for %s"
              % (ds, name)
          )
      return url
  
imports: import logging
  import os
  from os.path import curdir
  import shlex
  from os.path import join
  from os.path import normpath, relpath
  from looseversion import LooseVersion
  from datalad import ssh_manager
  from datalad.cmd import CommandError, StdOutErrCapture, WitlessRunner
  from datalad.consts import TIMESTAMP_FMT, WEB_META_LOG
  from datalad.core.local.diff import diff_dataset
  from datalad.distribution.dataset import Dataset, EnsureDataset, datasetmethod, require_dataset, resolve_path
  from datalad.distribution.siblings import Siblings, _DelayedSuper
  from datalad.interface.base import Interface, build_doc, eval_results
  from datalad.interface.common_opts import annex_group_opt, annex_groupwanted_opt, annex_wanted_opt, as_common_datasrc, inherit_opt, publish_by_default, publish_depends, recursion_flag, recursion_limit
  from datalad.support.annexrepo import AnnexRepo
  from datalad.support.constraints import EnsureBool, EnsureChoice, EnsureNone, EnsureStr
  from datalad.support.exceptions import CapturedException, InsufficientArgumentsError, MissingExternalDependency
  from datalad.support.external_versions import external_versions
  from datalad.support.network import RI, PathRI, is_ssh
  from datalad.support.param import Parameter
  from datalad.ui import ui
  from datalad.utils import _path_, ensure_list, make_tempfile, on_windows
  from datalad.utils import quote_cmdlinearg
  from datalad.utils import slash_join
label_desc: Use image node_id 5 for calling the CreateSibling obj's underlying member method code with example usage: obj._get_remote_url(ds, name) and returns: url