class_docstr: In memory random sample iterator implemented in JAX.
  
  Loads the whole dataset in memory and performs random sampling with
  replacement of batches of `batch_size`.
  This class provides much faster sampling functionality compared to using
  an iterator on tf.data.Dataset.
docstr: An integer of the dataset cardinality.
docstr_tok: ["An","integer","of","the","dataset","cardinality","."]
code: def dataset_size(self) -> int:
      """An integer of the dataset cardinality."""
      return self._dataset_size
  
imports: import logging
  from typing import Any, Iterator, Optional, Tuple, Sequence
  from acme import specs
  from acme import types
  from flax import jax_utils
  import jax
  import jax.numpy
  import numpy
  import rlds
  import tensorflow
  import tensorflow_datasets
label_desc: Use image node_id 3 for calling the JaxInMemoryRandomSampleIterator obj's underlying member method code with example usage: obj.dataset_size() and returns: self