docstr: TODO:
  
  Returns:
      The results dict from executing the training iteration.
code: def training_step(self) -> ResultDict:
      """TODO:
  
      Returns:
          The results dict from executing the training iteration.
      """
  
      # Sample n MultiAgentBatches from n workers.
      with self._timers[SAMPLE_TIMER]:
          new_sample_batches = synchronous_parallel_sample(
              worker_set=self.workers, concat=False
          )
  
      for batch in new_sample_batches:
          # Update sampling step counters.
          self._counters[NUM_ENV_STEPS_SAMPLED] += batch.env_steps()
          self._counters[NUM_AGENT_STEPS_SAMPLED] += batch.agent_steps()
          # Store new samples in the replay buffer
          if self.local_replay_buffer is not None:
              self.local_replay_buffer.add(batch)
  
      if self.local_replay_buffer is not None:
          # Update target network every `target_network_update_freq` sample steps.
          cur_ts = self._counters[
              NUM_AGENT_STEPS_SAMPLED
              if self.config.count_steps_by == "agent_steps"
              else NUM_ENV_STEPS_SAMPLED
          ]
  
          if (
              cur_ts
              > self.config.num_steps_sampled_before_learning_starts
          ):
              train_batch = self.local_replay_buffer.sample(
                  self.config.train_batch_size
              )
          else:
              train_batch = None
      else:
          train_batch = concat_samples(new_sample_batches)
  
      # Learn on the training batch.
      # Use simple optimizer (only for multi-agent or tf-eager; all other
      # cases should use the multi-GPU optimizer, even if only using 1 GPU)
      train_results = {}
      if train_batch is not None:
          if self.config.get("simple_optimizer") is True:
              train_results = train_one_step(self, train_batch)
          else:
              train_results = multi_gpu_train_one_step(
                  self, train_batch
              )
  
      # TODO: Move training steps counter update outside of `train_one_step()` method.
      # # Update train step counters.
      # self._counters[NUM_ENV_STEPS_TRAINED] += train_batch.env_steps()
      # self._counters[NUM_AGENT_STEPS_TRAINED] += train_batch.agent_steps()
  
      # Update weights and global_vars - after learning on the local worker - on all
      # remote workers.
      global_vars = {
          "timestep": self._counters[NUM_ENV_STEPS_SAMPLED],
      }
      with self._timers[SYNCH_WORKER_WEIGHTS_TIMER]:
          self.workers.sync_weights(global_vars=global_vars)
  
      # Return all collected metrics for the iteration.
      return train_results
  
imports: import logging
  from typing import List, Optional, Type, Union
  from rllib_alpha_zero.alpha_zero.alpha_zero_policy import AlphaZeroPolicy
  from rllib_alpha_zero.alpha_zero.mcts import MCTS
  from rllib_alpha_zero.alpha_zero.ranked_rewards import get_r2_env_wrapper
  from ray.rllib.algorithms.algorithm import Algorithm
  from ray.rllib.algorithms.algorithm_config import AlgorithmConfig, NotProvided
  from ray.rllib.algorithms.callbacks import DefaultCallbacks
  from ray.rllib.execution.rollout_ops import synchronous_parallel_sample
  from ray.rllib.execution.train_ops import multi_gpu_train_one_step, train_one_step
  from ray.rllib.models.catalog import ModelCatalog
  from ray.rllib.models.modelv2 import restore_original_dimensions
  from ray.rllib.models.torch.torch_action_dist import TorchCategorical
  from ray.rllib.policy.policy import Policy
  from ray.rllib.policy.sample_batch import concat_samples
  from ray.rllib.utils.annotations import override
  from ray.rllib.utils.deprecation import DEPRECATED_VALUE
  from ray.rllib.utils.framework import try_import_torch
  from ray.rllib.utils.metrics import NUM_AGENT_STEPS_SAMPLED, NUM_ENV_STEPS_SAMPLED, SAMPLE_TIMER, SYNCH_WORKER_WEIGHTS_TIMER
  from ray.rllib.utils.replay_buffers.utils import validate_buffer_config
  from ray.rllib.utils.typing import ResultDict
label_desc: Use image node_id 3 for calling the AlphaZero obj's underlying member method code with example usage: obj.training_step() and returns: train_results