code: def execute_ssh_command(client, cmd):
      
      try:
          stdin, stdout, stderr = client.exec_command(cmd)
          err = stderr.read()
          out = stdout.read()
          if err:
              raise IpaSSHException(out.decode() + err.decode())
      except:  # noqa: E722
          raise
      return out.decode()
docs: Execute given command using paramiko.
  
      Returns:
          String output of cmd execution.
      Raises:
          IpaSSHException: If stderr returns a non-empty string.