class_docstr: Unit tests for transpile function
class_docstr_tok: ["Unit","tests","for","transpile","function"]
docstr: Test that applying the transform to a qnode adds the device to the transform kwargs.
docstr_tok: ["Test","that","applying","the","transform","to","a","qnode","adds","the","device","to","the","transform","kwargs","."]
code: def test_custom_qnode_transform(self):
      """Test that applying the transform to a qnode adds the device to the transform kwargs."""
  
      dev = qml.device("default.qubit", wires=(0, 1, 2))
  
      def qfunc():
          return qml.state()
  
      original_qnode = qml.QNode(qfunc, dev)
      transformed_qnode = transpile(
          original_qnode, coupling_map=[(0, 1), (1, 2)]
      )
  
      assert len(transformed_qnode.transform_program) == 1
      assert (
          transformed_qnode.transform_program[0].kwargs["device"] is dev
      )
  
imports: from math import isclose
  import pytest
  from pennylane import numpy
  import pennylane
  from pennylane.transforms.transpile import transpile
label_desc: Use image node_id 17 for calling the TestTranspile obj's underlying member method code with example usage: obj.test_custom_qnode_transform() and returns: qml