class_docstr: CQL learner.
  
  Learning component of the Conservative Q-Learning algorithm from
  [Kumar et al., 2020] https://arxiv.org/abs/2006.04779.
code: def step(self):
      # Get data from replay (dropping extras if any). Note there is no
      # extra data here because we do not insert any into Reverb.
      transitions = next(self._demonstrations)
  
      counts = self._counter.get_counts()
      if "learner_steps" not in counts:
          cur_step = 0
      else:
          cur_step = counts["learner_steps"]
      in_initial_bc_iters = cur_step < self._num_bc_iters
  
      if in_initial_bc_iters:
          self._state, metrics = self._update_step_in_initial_bc_iters(
              self._state, transitions
          )
      else:
          self._state, metrics = self._update_step_rest(
              self._state, transitions
          )
  
      # Compute elapsed time.
      timestamp = time.time()
      elapsed_time = (
          timestamp - self._timestamp if self._timestamp else 0
      )
      self._timestamp = timestamp
  
      # Increment counts and record the current time
      counts = self._counter.increment(steps=1, walltime=elapsed_time)
  
      # Attempts to write the logs.
      self._logger.write({**metrics, **counts})
  
imports: import time
  from typing import Any, Dict, Iterator, List, NamedTuple, Optional, Tuple
  import acme
  from acme import types
  from acme.agents.jax.cql.networks import apply_and_sample_n
  from acme.agents.jax.cql.networks import CQLNetworks
  from acme.jax import networks
  from acme.jax import utils
  from acme.utils import counting
  from acme.utils import loggers
  import jax
  import jax.numpy
  import optax
label_desc: Use image node_id 2 for calling the CQLLearner obj's underlying member method code with example usage: obj.step() without return types