code: def circuit_template(weights):
      qml.ArbitraryStatePreparation(weights, range(2))
      return qml.expval(qml.PauliZ(0))
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane import numpy
  from pennylane.templates.state_preparations.arbitrary_state_preparation import _state_preparation_pauli_words
label_desc: Use image node_id 2 for calling a global function with example usage: circuit_template(weights) and returns: qml