code: def test_ssh_manager_close():
      manager = SSHManager()
  
      # check for previously existing sockets:
      existed_before_1 = exists(
          opj(
              str(manager.socket_dir),
              get_connection_hash("datalad-test"),
          )
      )
      existed_before_2 = exists(
          opj(
              str(manager.socket_dir),
              get_connection_hash("datalad-test2"),
          )
      )
  
      manager.get_connection("ssh://datalad-test").open()
      manager.get_connection("ssh://datalad-test2").open()
  
      if existed_before_1 and existed_before_2:
          # we need one connection to be closed and therefore being opened
          # by `manager`
          manager.get_connection("ssh://datalad-test").close()
          manager.get_connection("ssh://datalad-test").open()
  
      ok_(
          exists(
              opj(
                  str(manager.socket_dir),
                  get_connection_hash("datalad-test"),
              )
          )
      )
      ok_(
          exists(
              opj(
                  str(manager.socket_dir),
                  get_connection_hash("datalad-test2"),
              )
          )
      )
  
      manager.close()
  
      still_exists_1 = exists(
          opj(
              str(manager.socket_dir),
              get_connection_hash("datalad-test"),
          )
      )
      still_exists_2 = exists(
          opj(
              str(manager.socket_dir),
              get_connection_hash("datalad-test2"),
          )
      )
  
      eq_(existed_before_1, still_exists_1)
      eq_(existed_before_2, still_exists_2)
  
file_path: datalad/datalad/support/tests/test_sshconnector.py
imports: import logging
  import os.path
  from os.path import exists, getmtime, isdir
  from os.path import join
  from datalad.tests.utils_pytest import SkipTest, assert_false, assert_in, assert_is_instance, assert_raises, eq_, get_most_obscure_supported_name, get_ssh_port, ok_, patch_config, skip_if_on_windows, skip_nomultiplex_ssh, skip_ssh, swallow_logs, with_tempfile, with_tree
  from datalad.utils import Path
  from ..sshconnector import MultiplexSSHConnection, MultiplexSSHManager, NoMultiplexSSHConnection, SSHConnection, SSHManager, get_connection_hash, sh_quote
label_desc: Use image node_id 3 for calling a global function with example usage: test_ssh_manager_close() without return types