code: def _quote_filename_for_scp(name):
      """Manually escape shell goodies in a file name.
  
      Why manual? Because the author couldn't find a better way, and
      simply quoting the entire filename does not work with SCP's overly
      strict file matching criteria (likely a bug on their side).
  
      Hence this beauty:
      """
      for s, t in (
          (" ", "\\ "),
          ('"', '\\"'),
          ("'", "\\'"),
          ("&", "\\&"),
          ("|", "\\|"),
          (">", "\\>"),
          ("<", "\\<"),
          (";", "\\;"),
      ):
          name = name.replace(s, t)
      return name
  
imports: import fasteners
  import os
  import logging
  from socket import gethostname
  from hashlib import md5
  from subprocess import Popen
  import tempfile
  import threading
  from datalad.utils import quote_cmdlinearg
  from datalad.support.exceptions import CapturedException, CommandError, ConnectionOpenFailedError
  from datalad.support.external_versions import external_versions
  from datalad.utils import auto_repr, Path, ensure_list, on_windows
  from datalad.cmd import NoCapture, StdOutErrCapture, WitlessRunner
  from ..None import cfg
label_desc: Use image node_id 2 for calling a global function with example usage: _quote_filename_for_scp(name) and returns: name