code: def setUp(self):
      super(BatchedPyMetricTest, self).setUp()
      # Order of args for trajectory methods:
      # (observation, action, policy_info, reward, discount)
      self._ts0 = nest_utils.stack_nested_arrays(
          [
              trajectory.boundary((), (), (), 0.0, 1.0),
              trajectory.boundary((), (), (), 0.0, 1.0),
          ]
      )
      self._ts1 = nest_utils.stack_nested_arrays(
          [
              trajectory.first((), (), (), 1.0, 1.0),
              trajectory.first((), (), (), 2.0, 1.0),
          ]
      )
      self._ts2 = nest_utils.stack_nested_arrays(
          [
              trajectory.last((), (), (), 3.0, 1.0),
              trajectory.last((), (), (), 4.0, 1.0),
          ]
      )
      self._ts3 = nest_utils.stack_nested_arrays(
          [
              trajectory.boundary((), (), (), 0.0, 1.0),
              trajectory.boundary((), (), (), 0.0, 1.0),
          ]
      )
      self._ts4 = nest_utils.stack_nested_arrays(
          [
              trajectory.first((), (), (), 5.0, 1.0),
              trajectory.first((), (), (), 6.0, 1.0),
          ]
      )
      self._ts5 = nest_utils.stack_nested_arrays(
          [
              trajectory.last((), (), (), 7.0, 1.0),
              trajectory.last((), (), (), 8.0, 1.0),
          ]
      )
  
file_path: agents/tf_agents/metrics/batched_py_metric_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import tensorflow
  from tf_agents.metrics import batched_py_metric
  from tf_agents.metrics import py_metrics
  from tf_agents.trajectories import trajectory
  from tf_agents.utils import nest_utils
label_desc: Use image node_id 1 for calling the BatchedPyMetricTest obj's underlying member method code with example usage: obj.setUp() without return types