docs: def ssh_cmdline(self, cmd):
          """
          Get argument list for meth:`subprocess.Popen()` to run ssh.
  
          :param cmd:
              a list of arguments to pass to ssh
          :returns:
              argument list to pass as the first argument to subprocess.Popen()
  
          .. note::
              you must call :meth:`connect()` at least once
              before calling this method.
  
          This method returns the ``args`` argument (first argument) to
          subprocess.Popen() required to execute the specified command on the
          phablet device. You can use it to construct your own connections, to
          intercept command output or to setup any additional things that you may
          require.
  
          .. versionadded:: 0.2
          """
          if not isinstance(cmd, list):
              raise TypeError("cmd needs to be a list")
          if not all(isinstance(item, str) for item in cmd):
              raise TypeError("cmd needs to be a list of strings")
          if self._port is None:
              raise ProgrammingError("run connect() first")
          ssh_cmd = ['ssh']
          for opt in self._get_ssh_options():
              ssh_cmd.append('-o')
              ssh_cmd.append(opt)
          ssh_cmd.extend(['phablet@localhost', '--'])
          ssh_cmd.extend(cmd)
          _logger.debug("ssh_cmdline %r => %r", cmd, ssh_cmd)
          return ssh_cmd