class_docstr: Adder which adds from time to time some demonstrations.
  
  Lfd stands for Learning From Demonstrations and is the same technique
  as the one used in R2D3.
class_docstr_tok: ["Adder","which","adds","from","time","to","time","some","demonstrations",".","Lfd","stands","for","Learning","From","Demonstrations","and","is","the","same","technique","as","the","one","used","in","R2D3","."]
code: def _add_demonstration_episode(self):
      _, timestep = next(self._demonstrations)
      if not timestep.first():
          raise ValueError("Expecting the start of an episode.")
      self._adder.add_first(timestep)
      self._delta_demonstration_step_count -= (
          1.0 - self._demonstration_ratio
      )
      while not timestep.last():
          action, timestep = next(self._demonstrations)
          self._adder.add(action, timestep)
          self._delta_demonstration_step_count -= (
              1.0 - self._demonstration_ratio
          )
  
      # Reset is being called periodically to reset the connection to reverb.
      # TODO(damienv, bshahr): Make the reset an internal detail of the reverb
      # adder and remove it from the adder API.
      self._adder.reset()
  
file_path: acme/acme/agents/jax/lfd/lfd_adder.py
imports: from typing import Any, Iterator, Tuple
  from acme import adders
  from acme import types
  import dm_env
label_desc: Use image node_id 3 for calling the LfdAdder obj's underlying member method code with example usage: obj._add_demonstration_episode() without return types