class_docstr: Representation of an SSH connection.
      
class_docstr_tok: ["Representation","of","an","SSH","connection","."]
code: def get_annex_installdir(self):
      key = "installdir:annex"
      if key in self._remote_props:
          return self._remote_props[key]
      annex_install_dir = None
      # already set here to avoid any sort of recursion until we know
      # more
      self._remote_props[key] = annex_install_dir
      try:
          with tempfile.TemporaryFile() as tempf:
              # TODO does not work on windows
              annex_install_dir = self(
                  # use sh -e to be able to fail at each stage of the process
                  "sh -e -c 'dirname $(readlink -f $(which git-annex-shell))'",
                  stdin=tempf,
              )[0].strip()
      except CommandError as e:
          lgr.debug(
              "Failed to locate remote git-annex installation: %s",
              CapturedException(e),
          )
      self._remote_props[key] = annex_install_dir
      return annex_install_dir
  
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 14 for calling the BaseSSHConnection obj's underlying member method code with example usage: obj.get_annex_installdir() and returns: annex_install_dir, self