class_docstr: Utility class for storing rollouts.
  
  Currently supports two behaviours: the original, which
  simply dumps everything to a pickle file once complete,
  and a mode which stores each rollout as an entry in a Python
  shelf db file. The latter mode is more robust to memory problems
  or crashes part-way through the rollout generation. Each rollout
  is stored with a key based on the episode number (0-indexed),
  and the number of episodes is stored with the key "num_episodes",
  so to load the shelf file, use something like:
  
  with shelve.open('rollouts.pkl') as rollouts:
     for episode_index in range(rollouts["num_episodes"]):
        rollout = rollouts[str(episode_index)]
  
  If outfile is None, this class does nothing.
code: def _get_progress(self):
      if self._target_episodes:
          return "{} / {} episodes completed".format(
              self._num_episodes, self._target_episodes
          )
      elif self._target_steps:
          return "{} / {} steps completed".format(
              self._total_steps, self._target_steps
          )
      else:
          return "{} episodes completed".format(self._num_episodes)
  
imports: import collections
  import copy
  import gymnasium
  import json
  import os
  from pathlib import Path
  import shelve
  import typer
  import ray
  import ray.cloudpickle
  from ray.rllib.env import MultiAgentEnv
  from ray.rllib.env.base_env import _DUMMY_AGENT_ID
  from ray.rllib.env.env_context import EnvContext
  from ray.rllib.evaluation.worker_set import WorkerSet
  from ray.rllib.policy.sample_batch import DEFAULT_POLICY_ID
  from ray.rllib.utils.spaces.space_utils import flatten_to_single_ndarray
  from ray.rllib.common import CLIArguments
  from ray.train._checkpoint import Checkpoint
  from ray.train._internal.session import _TrainingResult
  from ray.tune.utils import merge_dicts
  from ray.tune.registry import get_trainable_cls, _global_registry, ENV_CREATOR
label_desc: Use image node_id 6 for calling the RolloutSaver obj's underlying member method code with example usage: obj._get_progress() and returns: str, str, str