code: def test_flatten_unflatten_standard_checks(op_type):
      """Test the flatten and unflatten methods."""
      u_tape = qml.tape.QuantumScript(
          [qml.Hadamard("a"), qml.Identity("b")]
      )
  
      v_wires = qml.wires.Wires((0, 1))
      op = op_type(
          [0.1],
          v_function=global_v_circuit,
          v_wires=v_wires,
          u_tape=u_tape,
      )
      qml.ops.functions.assert_valid(op)
  
      data, metadata = op._flatten()
  
      assert data == (0.1,)
      assert metadata == (
          ("v_function", global_v_circuit),
          ("v_wires", v_wires),
          ("u_tape", u_tape),
      )
  
      assert hash(metadata)
  
      new_op = type(op)._unflatten(*op._flatten())
      assert qml.math.allclose(op.data, new_op.data)
      assert (
          op.hyperparameters["v_function"]
          == new_op.hyperparameters["v_function"]
      )
      assert (
          op.hyperparameters["v_wires"]
          == new_op.hyperparameters["v_wires"]
      )
      for op1, op2 in zip(
          op.hyperparameters["u_tape"], new_op.hyperparameters["u_tape"]
      ):
          assert qml.equal(op1, op2)
      assert new_op is not op
  
imports: import pytest
  import pennylane
label_desc: Use image node_id 2 for calling a global function with example usage: test_flatten_unflatten_standard_checks(op_type) without return types