code: def report_sampling_and_replay_buffer(*, replay_buffer):
      episodes_in_buffer = replay_buffer.get_num_episodes()
      ts_in_buffer = replay_buffer.get_num_timesteps()
      replayed_steps = replay_buffer.get_sampled_timesteps()
      added_steps = replay_buffer.get_added_timesteps()
  
      # Summarize buffer, sampling, and train ratio stats.
      return {
          "BUFFER_capacity": replay_buffer.capacity,
          "BUFFER_size_num_episodes": episodes_in_buffer,
          "BUFFER_size_timesteps": ts_in_buffer,
          "BUFFER_replayed_steps": replayed_steps,
          "BUFFER_added_steps": added_steps,
      }
  
file_path: ray/python/ray/rllib/algorithms/dreamerv3/utils/summaries.py
imports: import numpy
  from ray.rllib.algorithms.dreamerv3.utils.debugging import create_cartpole_dream_image, create_frozenlake_dream_image
  from ray.rllib.policy.sample_batch import SampleBatch
  from ray.rllib.utils.tf_utils import inverse_symlog
label_desc: Use image node_id 6 for calling a global function with example usage: report_sampling_and_replay_buffer() and returns: dict