code: def same_tape(tape1, tape2):
      """Raises an error if tapes are not identical"""
      assert all(
          o1.name == o2.name
          for o1, o2 in zip(tape1.operations, tape2.operations)
      )
      assert all(
          o1.wires == o2.wires
          for o1, o2 in zip(tape1.operations, tape2.operations)
      )
      assert all(
          np.allclose(o1.parameters, o2.parameters)
          for o1, o2 in zip(tape1.operations, tape2.operations)
      )
      assert len(tape1.measurements) == len(tape2.measurements)
      assert all(
          m1.return_type == m2.return_type
          for m1, m2 in zip(tape1.measurements, tape2.measurements)
      )
      assert all(
          o1.name == o2.name
          for o1, o2 in zip(tape1.observables, tape2.observables)
      )
      assert all(
          o1.wires == o2.wires
          for o1, o2 in zip(tape1.observables, tape2.observables)
      )
  
imports: from functools import partial
  import pytest
  from packaging import version
  import pennylane
  from pennylane import numpy
  from pennylane.tape import QuantumScript
  from pennylane.transforms import mitigate_with_zne, richardson_extrapolate, fold_global
label_desc: Use image node_id 1 for calling a global function with example usage: same_tape(tape1, tape2) without return types