class_docstr: Representation of a (shared) ssh connection.
      
class_docstr_tok: ["Representation","of","a","(","shared",")","ssh","connection","."]
code: def __call__(self, cmd, options=None, stdin=None, log_output=True):
      # XXX: check for open socket once
      #      and provide roll back if fails to run and was not explicitly
      #      checked first
      # MIH: this would mean that we would have to distinguish failure
      #      of a payload command from failure of SSH itself. SSH however,
      #      only distinguishes success and failure of the entire operation
      #      Increase in fragility from introspection makes a potential
      #      performance benefit a questionable improvement.
      # make sure we have an open connection, will test if action is needed
      # by itself
      self.open()
  
      ssh_cmd = [self.ssh_executable] + self._ssh_args
      return self._exec_ssh(
          ssh_cmd,
          cmd,
          options=options,
          stdin=stdin,
          log_output=log_output,
      )
  
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 the MultiplexSSHConnection obj's underlying member method code with example usage: obj.__call__(cmd, options, stdin, log_output) and returns: self