code: def _array_list_concatenator(
      minibatch_results: List[List[np.ndarray]],
  ) -> List[np.ndarray]:
      """
      Concatenates the arrays with the same sublist index into a single array.
      """
      n_classes = len(minibatch_results[0])
      to_concatenate = [
          list(zip(*minibatch_results))[idx] for idx in range(n_classes)
      ]
      concatenated = [
          np.concatenate(arrays, axis=0) for arrays in to_concatenate
      ]
  
      return concatenated
  
imports: import copy
  import logging
  from functools import partial
  from typing import Any, Callable, Dict, Generator, List, Optional, Tuple, Union
  import numpy
  from scipy import sparse
  import ray
label_desc: Use image node_id 4 for calling a global function with example usage: _array_list_concatenator(minibatch_results) and returns: concatenated