code: def _merge_param_gates(operations, merge_ops=None):
      """Merge the provided parameterized gates on the same wires that are adjacent to each other"""
  
      copied_ops = operations.copy()
      merged_ops, number_ops = [], 0
  
      while len(copied_ops) > 0:
          curr_gate = copied_ops.pop(0)
  
          # If gate is not to be merged, let it go
          if merge_ops is not None and curr_gate.name not in merge_ops:
              merged_ops.append(curr_gate)
              continue
  
          # If gate is in the merge_ops, update counter
          if curr_gate.name in merge_ops:
              number_ops += 1
  
          # Find the next gate that acts on the same wires
          next_gate_idx = find_next_gate(curr_gate.wires, copied_ops)
          if next_gate_idx is None:
              merged_ops.append(curr_gate)
              continue
  
          # Initialize the current angle and iterate until end of merge
          curr_params = curr_gate.parameters
          curr_intrfc = qml.math.get_deep_interface(
              curr_gate.parameters
          )
          cumulative_angles = qml.math.array(
              curr_params, dtype=float, like=curr_intrfc
          )
          next_gate = copied_ops[next_gate_idx]
          while (
              curr_gate.name == next_gate.name
              and curr_gate.wires == next_gate.wires
          ):
              cumulative_angles += qml.math.array(
                  next_gate.parameters, like=curr_intrfc
              )
              # Check if the subsequent gate exists in the vicinity
              copied_ops.pop(next_gate_idx)
              next_gate_idx = find_next_gate(
                  curr_gate.wires, copied_ops
              )
              if next_gate_idx is None:
                  break
              next_gate = copied_ops[next_gate_idx]
  
          # Replace the current gate, add it to merged list and pop it from orginal one
          merged_ops.append(
              curr_gate.__class__(
                  *cumulative_angles, wires=curr_gate.wires
              )
          )
  
      return merged_ops, number_ops
  
file_path: pennylane/pennylane/transforms/decompositions/clifford_t_transform.py
imports: import math
  import warnings
  from itertools import product
  from typing import Sequence, Callable
  import pennylane
  from pennylane.queuing import QueuingManager
  from pennylane.transforms.core import transform
  from pennylane.tape import QuantumTape
  from pennylane.transforms.optimization import cancel_inverses, commute_controlled, merge_rotations, remove_barrier
  from pennylane.transforms.optimization.optimization_utils import find_next_gate, _fuse_global_phases
  from pennylane.ops.op_math.decompositions.solovay_kitaev import sk_decomposition
label_desc: Use image node_id 7 for calling a global function with example usage: _merge_param_gates(operations, merge_ops) and returns: merged_ops,  number_ops