class_docstr: Tests for the expval function
class_docstr_tok: ["Tests","for","the","expval","function"]
docstr: Test that tf.function does not break process_state
docstr_tok: ["Test","that","tf.function","does","not","break","process_state"]
code: def test_tf_function(self, state, expected):
      """Test that tf.function does not break process_state"""
      import tensorflow as tf
  
      @tf.function
      def compute_expval(s):
          mp = ExpectationMP(obs=qml.PauliZ(0))
          return mp.process_state(s, wire_order=qml.wires.Wires([0]))
  
      state = tf.Variable(state, dtype=tf.float64)
      assert qml.math.allequal(compute_expval(state), expected)
  
imports: import copy
  import numpy
  import pytest
  import pennylane
  from pennylane.measurements import Expectation, Shots
  from pennylane.measurements.expval import ExpectationMP
label_desc: Use image node_id 16 for calling the TestExpval obj's underlying member method code with example usage: obj.test_tf_function(state, expected) and returns: mp