class_docstr: Computes the average undiscounted reward.
docstr: Processes the trajectory to update the metric.
  
  Args:
    trajectory: a tf_agents.trajectory.Trajectory.
docstr_tok: ["Processes","the","trajectory","to","update","the","metric",".","Args",":","trajectory",":","a","tf_agents.trajectory.Trajectory","."]
code: def _batched_call(self, trajectory):
      """Processes the trajectory to update the metric.
  
      Args:
        trajectory: a tf_agents.trajectory.Trajectory.
      """
      episode_return = self._np_state.episode_return
  
      is_first = np.where(trajectory.is_first())
      episode_return[is_first] = 0
  
      episode_return += trajectory.reward
  
      is_last = np.where(trajectory.is_last())
      self.add_to_buffer(episode_return[is_last])
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import abc
  from typing import Any, Iterable, Optional, Text
  import gin
  import numpy
  import six
  from tf_agents.metrics import py_metric
  from tf_agents.trajectories import trajectory
  from tf_agents.typing import types
  from tf_agents.utils import nest_utils
  from tf_agents.utils import numpy_storage
label_desc: Use image node_id 3 for calling the AverageReturnMetric obj's underlying member method code with example usage: obj._batched_call(trajectory) without return types