class_docstr: A class that provides distributed, random access to a Dataset.
  
  See: ``Dataset.to_random_access_dataset()``.
class_docstr_tok: ["A","class","that","provides","distributed",",","random","access","to","a","Dataset",".","See",":","``","Dataset.to_random_access_dataset","(",")","``","."]
docstr: Returns a string containing access timing information.
docstr_tok: ["Returns","a","string","containing","access","timing","information","."]
code: def stats(self) -> str:
      """Returns a string containing access timing information."""
      stats = ray.get([w.stats.remote() for w in self._workers])
      total_time = sum(s["total_time"] for s in stats)
      accesses = [s["num_accesses"] for s in stats]
      blocks = [s["num_blocks"] for s in stats]
      msg = "RandomAccessDataset:\n"
      msg += "- Build time: {}s\n".format(round(self._build_time, 2))
      msg += "- Num workers: {}\n".format(len(stats))
      msg += "- Blocks per worker: {} min, {} max, {} mean\n".format(
          min(blocks), max(blocks), int(sum(blocks) / len(blocks))
      )
      msg += "- Accesses per worker: {} min, {} max, {} mean\n".format(
          min(accesses),
          max(accesses),
          int(sum(accesses) / len(accesses)),
      )
      msg += "- Mean access time: {}us\n".format(
          int(total_time / (1 + sum(accesses)) * 1e6)
      )
      return msg
  
imports: import bisect
  import logging
  import random
  import time
  from collections import defaultdict
  from typing import TYPE_CHECKING, Any, List, Optional
  import numpy
  import ray
  from ray.data._internal.remote_fn import cached_remote_fn
  from ray.data.block import BlockAccessor
  from ray.data.context import DataContext
  from ray.types import ObjectRef
  from ray.util.annotations import PublicAPI
label_desc: Use image node_id 5 for calling the RandomAccessDataset obj's underlying member method code with example usage: obj.stats() and returns: msg