code: def _get_generators(trainable_op):
      """From a trainable operation, extract the unitary generators and their coefficients. If an operation is added here
      one needs to also update the list of supported operation in the expand function given to the gradient transform.
      """
      # For PhaseShift, we need to separate the generator in two unitaries (Hardware compatibility)
      if isinstance(trainable_op, (qml.PhaseShift, qml.U1)):
          generators = [qml.PauliZ(wires=trainable_op.wires)]
          coeffs = [-0.5]
      elif isinstance(trainable_op, qml.CRX):
          generators = [
              qml.PauliX(wires=trainable_op.wires[1]),
              qml.prod(
                  qml.PauliZ(wires=trainable_op.wires[0]),
                  qml.PauliX(wires=trainable_op.wires[1]),
              ),
          ]
          coeffs = [-0.25, 0.25]
      elif isinstance(trainable_op, qml.CRY):
          generators = [
              qml.PauliY(wires=trainable_op.wires[1]),
              qml.prod(
                  qml.PauliZ(wires=trainable_op.wires[0]),
                  qml.PauliY(wires=trainable_op.wires[1]),
              ),
          ]
          coeffs = [-0.25, 0.25]
      elif isinstance(trainable_op, qml.CRZ):
          generators = [
              qml.PauliZ(wires=trainable_op.wires[1]),
              qml.prod(
                  qml.PauliZ(wires=trainable_op.wires[0]),
                  qml.PauliZ(wires=trainable_op.wires[1]),
              ),
          ]
          coeffs = [-0.25, 0.25]
      elif isinstance(trainable_op, qml.IsingXX):
          generators = [
              qml.prod(
                  qml.PauliX(wires=trainable_op.wires[0]),
                  qml.PauliX(wires=trainable_op.wires[1]),
              )
          ]
          coeffs = [-0.5]
      elif isinstance(trainable_op, qml.IsingYY):
          generators = [
              qml.prod(
                  qml.PauliY(wires=trainable_op.wires[0]),
                  qml.PauliY(wires=trainable_op.wires[1]),
              )
          ]
          coeffs = [-0.5]
      elif isinstance(trainable_op, qml.IsingZZ):
          generators = [
              qml.prod(
                  qml.PauliZ(wires=trainable_op.wires[0]),
                  qml.PauliZ(wires=trainable_op.wires[1]),
              )
          ]
          coeffs = [-0.5]
      # For rotation it is possible to only use PauliZ by applying some other rotations in the main function
      elif isinstance(trainable_op, qml.Rot):
          generators = [qml.PauliZ(wires=trainable_op.wires)]
          coeffs = [-0.5]
      else:
          generators = trainable_op.generator().ops
          coeffs = trainable_op.generator().coeffs
  
      return coeffs, generators
  
file_path: pennylane/pennylane/gradients/hadamard_gradient.py
imports: from typing import Sequence, Callable
  from functools import partial
  import numpy
  import pennylane
  from pennylane.gradients.metric_tensor import _get_aux_wire
  from pennylane import transform
  from pennylane.gradients.gradient_transform import _contract_qjac_with_cjac
  from pennylane.transforms.tape_expand import expand_invalid_trainable_hadamard_gradient
  from .gradient_transform import _all_zero_grad, assert_no_state_returns, assert_no_tape_batching, assert_no_variance, choose_trainable_params, find_and_validate_gradient_methods, _no_trainable_grad
label_desc: Use image node_id 4 for calling a global function with example usage: _get_generators(trainable_op) and returns: coeffs,  generators