class_docstr: Coordinator of n (possibly remote) Learner workers.
  
  Each Learner worker has a copy of the RLModule, the loss function(s), and
  one or more optimizers.
docstr: Get results from the worker manager and group them by tag.
  
  Returns:
      A list of lists of results, where each inner list contains all results
      for same tags.
docstr_tok: ["Get","results","from","the","worker","manager","and","group","them","by","tag",".","Returns",":","A","list","of","lists","of","results",",","where","each","inner","list","contains","all","results","for","same","tags","."]
code: def _get_async_results(self, results):
      """Get results from the worker manager and group them by tag.
  
      Returns:
          A list of lists of results, where each inner list contains all results
          for same tags.
  
      """
      if results is None:
          return []
  
      unprocessed_results = defaultdict(list)
      for result in results:
          result_or_error = result.get()
          if result.ok:
              tag = result.tag
              if not tag:
                  raise RuntimeError(
                      "Cannot call `LearnerGroup._get_async_results()` on untagged "
                      "async requests!"
                  )
              unprocessed_results[tag].append(result_or_error)
  
              if tag in self._update_request_tags:
                  self._update_request_tags[tag] -= 1
                  if self._update_request_tags[tag] == 0:
                      del self._update_request_tags[tag]
              else:
                  assert tag in self._additional_update_request_tags
                  self._additional_update_request_tags[tag] -= 1
                  if self._additional_update_request_tags[tag] == 0:
                      del self._additional_update_request_tags[tag]
  
          else:
              raise result_or_error
  
      return list(unprocessed_results.values())
  
imports: from collections import defaultdict, Counter
  from functools import partial
  import pathlib
  from typing import Any, Callable, Dict, List, Optional, Set, Type, Union
  import uuid
  import ray
  from ray.rllib.algorithms.algorithm_config import AlgorithmConfig
  from ray.rllib.core.learner.learner import Learner
  from ray.rllib.core.learner.reduce_result_dict_fn import _reduce_mean_results
  from ray.rllib.core.rl_module.rl_module import SingleAgentRLModuleSpec, RLMODULE_STATE_DIR_NAME
  from ray.rllib.policy.sample_batch import MultiAgentBatch
  from ray.rllib.utils.actor_manager import FaultTolerantActorManager
  from ray.rllib.utils.deprecation import Deprecated, deprecation_warning
  from ray.rllib.utils.minibatch_utils import ShardBatchIterator, ShardEpisodesIterator
  from ray.rllib.utils.numpy import convert_to_numpy
  from ray.rllib.utils.typing import EpisodeType, ModuleID, ResultDict, RLModuleSpec, ShouldModuleBeUpdatedFn
  from ray.train._internal.backend_executor import BackendExecutor
  from ray.tune.utils.file_transfer import sync_dir_between_nodes
  from ray.util.annotations import PublicAPI
label_desc: Use image node_id 9 for calling the LearnerGroup obj's underlying member method code with example usage: obj._get_async_results(results) and returns: list, list