code: def _ps_to_coeff_term(ps, wire_order):
      """Convert a non-empty pauli sentence to a list of coeffs and terms."""
      ops_str = []
      pws, coeffs = zip(*ps.items())
  
      for pw in pws:
          if len(pw) == 0:
              ops_str.append("")
              continue
          wires, ops = zip(*pw.items())
          ops_str.append(
              " ".join(
                  [
                      f"{op}{wire_order.index(wire)}"
                      for op, wire in zip(ops, wires)
                  ]
              )
          )
  
      return coeffs, ops_str
  
imports: import warnings
  from itertools import product
  import numpy
  import pennylane
  from pennylane.operation import Tensor, active_new_opmath
  from pennylane.pauli import pauli_sentence
  from pennylane.wires import Wires
label_desc: Use image node_id 3 for calling a global function with example usage: _ps_to_coeff_term(ps, wire_order) and returns: coeffs,  ops_str