class_docstr: R2D2 learner.
  
  This is the learning component of the R2D2 agent. It takes a dataset as input
  and implements update functionality to learn from this dataset.
class_docstr_tok: ["R2D2","learner",".","This","is","the","learning","component","of","the","R2D2","agent",".","It","takes","a","dataset","as","input","and","implements","update","functionality","to","learn","from","this","dataset","."]
code: def step(self):
      # Run the learning step.
      results = self._step()
  
      # Compute elapsed time.
      timestamp = time.time()
      elapsed_time = (
          timestamp - self._timestamp if self._timestamp else 0
      )
      self._timestamp = timestamp
  
      # Update our counts and record it.
      counts = self._counter.increment(steps=1, walltime=elapsed_time)
      results.update(counts)
      self._logger.write(results)
  
imports: import functools
  import time
  from typing import Dict, Iterator, List, Mapping, Union, Optional
  import acme
  from acme import specs
  from acme.adders import reverb
  from acme.tf import losses
  from acme.tf import networks
  from acme.tf import savers
  from acme.tf import utils
  from acme.utils import counting
  from acme.utils import loggers
  import numpy
  import reverb
  import sonnet
  import tensorflow
  import tree
label_desc: Use image node_id 3 for calling the R2D2Learner obj's underlying member method code with example usage: obj.step() without return types