code: def test_validate_adjoint_trainable_params_state_prep_error():
      """Tests error raised for validate_adjoint_trainable_params with trainable state-preps."""
      tape = qml.tape.QuantumScript(
          [qml.StatePrep(qml.numpy.array([1.0, 0.0]), wires=[0])]
      )
      with pytest.raises(
          qml.QuantumFunctionError,
          match="Differentiating with respect to",
      ):
          validate_adjoint_trainable_params(tape)
  
imports: import pytest
  import pennylane
  from pennylane.operation import Operation
  from pennylane.tape import QuantumScript
  from pennylane import DeviceError
  from pennylane.devices.preprocess import no_sampling, validate_device_wires, validate_multiprocessing_workers, validate_adjoint_trainable_params, _operator_decomposition_gen, decompose, validate_observables, validate_measurements
label_desc: Use image node_id 3 for calling a global function with example usage: test_validate_adjoint_trainable_params_state_prep_error() without return types