class_docstr: Unit tests for policy gradient.
class_docstr_tok: ["Unit","tests","for","policy","gradient","."]
code: def _setup_trajectory(self, sut):
      # Corresponds to the case where sut.end() is not called.
      sut._trajectory_rewards = [0.1, 0.2]
      sut._trajectory_actions = [0, 1]
      sut._trajectory_states = [
          np.array([0.1], np.float32),
          np.array([0.2], np.float32),
          np.array([0.3], np.float32),
      ]
      sut._value_network.eval = MagicMock(
          side_effect=[
              np.array([[[3]]], np.float32),
              np.array([[[2]]], np.float32),
              np.array([[[1]]], np.float32),
          ]
      )
  
imports: import unittest
  import cntk.contrib.deeprl.tests.spaces
  import numpy
  from cntk.contrib.deeprl.agent.policy_gradient import ActorCritic
  from cntk.layers import Dense
  from cntk.losses import cross_entropy_with_softmax
  from cntk.ops import input_variable, placeholder
label_desc: Use image node_id 14 for calling the PolicyGradientTest obj's underlying member method code with example usage: obj._setup_trajectory(sut) without return types