class_docstr: Pytree related checks.
class_docstr_tok: ["Pytree","related","checks","."]
docstr: Check an operation that errors out of the _unflatten call.
docstr_tok: ["Check","an","operation","that","errors","out","of","the","_unflatten","call","."]
code: def test_bad_pytree(self):
      """Check an operation that errors out of the _unflatten call."""
  
      class BadPytree(qml.operation.Operator):
          def __init__(self, wires1, wires2):
              super().__init__(wires=wires1 + wires2)
  
      op = BadPytree([0], [1])
  
      with pytest.raises(
          AssertionError,
          match=r"BadPytree._unflatten must be able to reproduce",
      ):
          assert_valid(op, skip_pickle=True)
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane.operation import Operator
  from pennylane.ops.functions import assert_valid
label_desc: Use image node_id 2 for calling the TestPytree obj's underlying member method code with example usage: obj.test_bad_pytree() without return types