class_docstr: Counts the number of episodes in the environment.
code: def call(self, trajectory: traj.Trajectory):
      if trajectory.step_type.ndim == 0:
          trajectory = nest_utils.batch_nested_array(trajectory)
  
      completed_episodes = np.sum(trajectory.is_last().astype(np.int64))
      self._np_state.number_episodes += completed_episodes
  
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 4 for calling the NumberOfEpisodes obj's underlying member method code with example usage: obj.call(trajectory) without return types