code: def test_float32_warning():
      """Test that a warning is raised if provided float32 parameters."""
      x = np.array(0.1, dtype=np.float32)
      tape = qml.tape.QuantumScript(
          [qml.RX(x, 0)], [qml.expval(qml.PauliZ(0))]
      )
      with pytest.warns(
          UserWarning, match="Finite differences with float32 detected."
      ):
          finite_diff(tape)
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.devices import DefaultQubitLegacy
  from pennylane.gradients import finite_diff, finite_diff_coeffs
  from pennylane.operation import AnyWires, Observable
label_desc: Use image node_id 1 for calling a global function with example usage: test_float32_warning() without return types