code: def test_quoting(path=None):
      ds = Dataset(op.join(path, OBSCURE_FILENAME)).create(force=True)
      # Our custom procedure fails if it receives anything other than two
      # procedure arguments (so the script itself receives 3). Check a few cases
      # from the Python API and CLI.
      ds.config.add(
          "datalad.locations.dataset-procedures", "code", scope="branch"
      )
      with swallow_outputs():
          ds.run_procedure(
              spec=["just2args", "with ' sing", 'with " doub']
          )
          assert_in_results(
              ds.run_procedure(
                  spec=["just2args", "still-one arg"],
                  on_failure="ignore",
                  result_renderer=None,
              ),
              action="run",
              status="error",
          )
  
          runner = WitlessRunner(cwd=ds.path)
          runner.run(
              "datalad run-procedure just2args \"with ' sing\" 'with \" doub'",
              protocol=KillOutput,
          )
          with assert_raises(CommandError):
              runner.run(
                  "datalad run-procedure just2args 'still-one arg'",
                  protocol=KillOutput,
              )
  
imports: import json
  import os.path
  import sys
  from unittest.mock import patch
  from datalad.api import run_procedure
  from datalad.cmd import KillOutput, WitlessRunner
  from datalad.distribution.dataset import Dataset
  from datalad.support.exceptions import CommandError, InsufficientArgumentsError
  from datalad.tests.utils_pytest import OBSCURE_FILENAME, assert_false, assert_in_results, assert_not_in_results, assert_raises, assert_repo_status, assert_result_count, assert_true, eq_, known_failure_windows, ok_file_has_content, patch_config, with_tempfile, with_tree, xfail_buggy_annex_info
  from datalad.utils import chpwd, quote_cmdlinearg, swallow_outputs
label_desc: Use image node_id 7 for calling a global function with example usage: test_quoting(path) without return types