code: def calculate_round_robin_weights(
      config: AlgorithmConfig,
  ) -> List[float]:
      """Calculate the round robin weights for the rollout and train steps"""
      if not config["training_intensity"]:
          return [1, 1]
      # e.g., 32 / 4 -> native ratio of 8.0
      native_ratio = (
          config["train_batch_size"] / config["rollout_fragment_length"]
      )
      # Training intensity is specified in terms of
      # (steps_replayed / steps_sampled), so adjust for the native ratio.
      weights = [1, config["training_intensity"] / native_ratio]
      return weights
  
file_path: ray/rllib_contrib/slate_q/src/rllib_slate_q/slate_q/slateq.py
imports: import logging
  from typing import Any, Dict, List, Optional, Type, Union
  from rllib_slate_q.slate_q.slateq_tf_policy import SlateQTFPolicy
  from rllib_slate_q.slate_q.slateq_torch_policy import SlateQTorchPolicy
  from ray.rllib.algorithms.algorithm_config import AlgorithmConfig, NotProvided
  from ray.rllib.algorithms.dqn.dqn import DQN
  from ray.rllib.policy.policy import Policy
  from ray.rllib.utils.annotations import override
  from ray.rllib.utils.deprecation import DEPRECATED_VALUE
label_desc: Use image node_id 1 for calling a global function with example usage: calculate_round_robin_weights(config) and returns: weights, list