code: def _test_decomposition(
      U, rotation_type, expected_gates, expected_params
  ):
      """Tests the unitary decomposition transforms"""
  
      obtained_gates = one_qubit_decomposition(
          U, Wires("a"), rotation_type, return_global_phase=True
      )
      _run_assertions(
          U, expected_gates, expected_params, obtained_gates
      )
  
      obtained_gates = one_qubit_decomposition(
          U, Wires("a"), rotation_type, return_global_phase=False
      )
      _run_assertions(
          U, expected_gates[:-1], expected_params[:-1], obtained_gates
      )
  
imports: from functools import reduce
  import pytest
  from gate_data import I, Z, S, T, H, X, Y, CNOT, SWAP
  import pennylane
  from pennylane import numpy
  from pennylane.wires import Wires
  from pennylane.ops.op_math.decompositions import one_qubit_decomposition
  from pennylane.ops.op_math.decompositions import two_qubit_decomposition
  from pennylane.ops.op_math.decompositions.two_qubit_unitary import _convert_to_su4, _su2su2_to_tensor_products, _compute_num_cnots
label_desc: Use image node_id 3 for calling a global function with example usage: _test_decomposition(U, rotation_type, expected_gates, expected_params) without return types