class_docstr: Base class for Reverb adders.
class_docstr_tok: ["Base","class","for","Reverb","adders","."]
docstr: Record the first observation of a trajectory.
docstr_tok: ["Record","the","first","observation","of","a","trajectory","."]
code: def add_first(self, timestep: dm_env.TimeStep):
      """Record the first observation of a trajectory."""
      if not timestep.first():
          raise ValueError(
              "adder.add_first with an initial timestep (i.e. one for "
              "which timestep.first() is True"
          )
  
      # Record the next observation but leave the history buffer row open by
      # passing `partial_step=True`.
      self._writer.append(
          dict(
              observation=timestep.observation,
              start_of_episode=timestep.first(),
          ),
          partial_step=True,
      )
      self._add_first_called = True
  
imports: import abc
  import time
  from typing import Callable, Iterable, Mapping, NamedTuple, Optional, Sized, Union, Tuple
  from absl import logging
  from acme import specs
  from acme import types
  from acme.adders import base
  import dm_env
  import numpy
  import reverb
  import tensorflow
  import tree
label_desc: Use image node_id 6 for calling the ReverbAdder obj's underlying member method code with example usage: obj.add_first(timestep) without return types