code: def get_local_connection(logger, use_sudo=False):
      
      return get_connection(
          socket.gethostname(),  # cannot rely on 'localhost' here
          None,
          logger=logger,
          threads=1,
          use_sudo=use_sudo,
          detect_sudo=False
      )
docs: Helper for local connections that are sometimes needed to operate
      on local hosts