code: def test_convert_arrays_to_numpy(framework, shots):
      """Tests that convert_to_numpy_parameters works with autograd arrays."""
  
      x = qml.math.asarray(np.array(1.234), like=framework)
      y = qml.math.asarray(np.array(0.652), like=framework)
      M = qml.math.asarray(np.eye(2), like=framework)
      state = qml.math.asarray(np.array([1, 0]), like=framework)
  
      numpy_data = np.array(0.62)
  
      ops = [
          qml.StatePrep(state, 0),
          qml.RX(x, 0),
          qml.RY(y, 1),
          qml.CNOT((0, 1)),
          qml.RZ(numpy_data, 0),
      ]
      m = [qml.state(), qml.expval(qml.Hermitian(M, 0))]
  
      qs = qml.tape.QuantumScript(ops, m, shots=shots)
      new_qs = convert_to_numpy_parameters(qs)
  
      # check ops that should be unaltered
      assert new_qs[3] is qs[3]
      assert new_qs[4] is qs[4]
      assert new_qs.measurements[0] is qs.measurements[0]
  
      for ind in (0, 1, 2, 6):
          assert qml.equal(
              new_qs[ind],
              qs[ind],
              check_interface=False,
              check_trainability=False,
          )
          assert qml.math.get_interface(*new_qs[ind].data) == "numpy"
  
      # check shots attribute matches
      assert new_qs.shots == qs.shots
  
file_path: pennylane/tests/transforms/test_convert_to_numpy_parameters.py
imports: import pytest
  import numpy
  import pennylane
  from pennylane.transforms import convert_to_numpy_parameters
  from pennylane.transforms.convert_to_numpy_parameters import _convert_op_to_numpy_data, _convert_measurement_to_numpy_data
label_desc: Use image node_id 1 for calling a global function with example usage: test_convert_arrays_to_numpy(framework, shots) without return types