code: def _add_operations_to_graph(
      tape, graph, gate_types, q_mapper, c_mapper
  ):
      """Add the tape operation to the PyZX graph."""
      # Create graph from circuit in the quantum tape (operations, measurements)
      for op in tape.operations:
          # Check that the gate is compatible with PyZX
          name = op.name
          if name not in gate_types:
              raise qml.QuantumFunctionError(
                  "The expansion of the quantum tape failed, PyZX does not support",
                  name,
              )
  
          # Apply wires and parameters
          map_gate = gate_types[name]
  
          args = [*op.wires, *(p / np.pi for p in op.parameters)]
  
          gate = map_gate(*args)
          gate.to_graph(graph, q_mapper, c_mapper)
  
file_path: pennylane/pennylane/transforms/zx/converter.py
imports: from functools import partial
  from typing import Sequence, Callable
  from collections import OrderedDict
  import numpy
  import pennylane
  from pennylane.tape import QuantumScript, QuantumTape
  from pennylane.transforms.op_transforms import OperationTransformError
  from pennylane.transforms import transform
  from pennylane.wires import Wires
label_desc: Use image node_id 3 for calling a global function with example usage: _add_operations_to_graph(tape, graph, gate_types, q_mapper, c_mapper) without return types