code: def test_url_quote_path(cls, clskwargs, target_url):
      path = "/ \"';a&b&cd `| "
      if not (cls is PathRI):
          clskwargs["hostname"] = hostname = "example.com"
      url = cls(path=path, **clskwargs)
      eq_(url.path, path)
      if "hostname" in clskwargs:
          eq_(url.hostname, hostname)
      # all nasty symbols should be quoted
      url_str = str(url)
      eq_(url_str, target_url)
      # no side-effects:
      eq_(url.path, path)
      if "hostname" in clskwargs:
          eq_(url.hostname, hostname)
  
      # and figured out and unquoted
      url_ = RI(url_str)
      ok_(isinstance(url_, cls))
      eq_(url_.path, path)
      if "hostname" in clskwargs:
          eq_(url.hostname, hostname)
  
imports: import logging
  import os
  import tempfile
  from os.path import isabs
  from os.path import join
  import pytest
  import datalad.support.network
  from datalad.distribution.dataset import Dataset
  from datalad.support.network import RI, SSHRI, URL, DataLadRI, GitTransportRI, PathRI, _split_colon, dlurljoin, get_local_file_url, get_response_disposition_filename, get_tld, get_url_straight_filename, is_datalad_compat_ri, is_ssh, is_url, iso8601_to_epoch, local_path_representation, local_path2url_path, local_url_path_representation, parse_url_opts, quote_path, same_website, urlquote, url_path2local_path
  from datalad.tests.utils_pytest import OBSCURE_FILENAME, SkipTest, assert_in, assert_raises, assert_status, eq_, get_most_obscure_supported_name, known_failure_githubci_win, neq_, nok_, ok_, skip_if, swallow_logs, with_tempfile
  from datalad.utils import Path, PurePosixPath, on_windows
  from ..network import rfc2822_to_epoch
label_desc: Use image node_id 16 for calling a global function with example usage: test_url_quote_path(cls, clskwargs, target_url) without return types