class_docstr: Test creating expansion functions from stopping criteria.
class_docstr_tok: ["Test","creating","expansion","functions","from","stopping","criteria","."]
docstr: Test expansion with created expand_fn.
docstr_tok: ["Test","expansion","with","created","expand_fn","."]
code: def test_create_expand_fn_expansion(self):
      """Test expansion with created expand_fn."""
      expand_fn = qml.transforms.create_expand_fn(
          depth=10, stop_at=self.crit_0
      )
      new_tape = expand_fn(self.tape)
      assert new_tape.operations[0] == self.tape.operations[0]
      assert new_tape.operations[1] == self.tape.operations[1]
      assert [op.name for op in new_tape.operations[2:]] == [
          "RZ",
          "RY",
          "RZ",
      ]
      assert np.allclose(
          [op.data for op in new_tape.operations[2:]],
          [[0.5], [0.2], [-0.1]],
      )
      assert [op.wires for op in new_tape.operations[2:]] == [
          qml.wires.Wires(0)
      ] * 3
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane.wires import Wires
label_desc: Use image node_id 2 for calling the TestCreateExpandFn obj's underlying member method code with example usage: obj.test_create_expand_fn_expansion() without return types