code: def _create_test_trajectory(self, batch_size):
      num_actions = tf.cast(batch_size / 2, dtype=tf.int32)
      action_tensor = tf.concat(
          [
              tf.range(num_actions, dtype=tf.int32),
              tf.range(num_actions, dtype=tf.int32),
          ],
          axis=-1,
      )
      return trajectory.Trajectory(
          observation=tf.ones(batch_size),
          action=action_tensor,
          policy_info=(),
          reward=tf.range(batch_size, dtype=tf.float32),
          discount=tf.ones(batch_size),
          step_type=ts.StepType.FIRST,
          next_step_type=ts.StepType.LAST,
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import tensorflow
  from tf_agents.bandits.metrics import tf_metrics
  from tf_agents.bandits.policies import constraints
  from tf_agents.specs import tensor_spec
  from tf_agents.trajectories import time_step
  from tf_agents.trajectories import trajectory
label_desc: Use image node_id 3 for calling the TFMetricsTest obj's underlying member method code with example usage: obj._create_test_trajectory(batch_size) and returns: trajectory