class_docstr: Class that processes an example from Audio collection and returns
  a dictionary with prepared signals.
  
  For example, the output dictionary may be the following
  ```
  {
      'input_signal': input_signal_tensor,
      'target_signal': target_signal_tensor,
      'reference_signal': reference_signal_tensor,
      'embedding_vector': embedding_vector
  }
  ```
  Keys in the output dictionary are ordered with synchronous signals given first,
  followed by asynchronous signals and embedding.
  
  Args:
      sample_rate: sample rate used for all audio signals
      random_offset: If `True`, offset will be randomized when loading a subsegment
                     from a file.
class_docstr_tok: ["Class","that","processes","an","example","from","Audio","collection","and","returns","a","dictionary","with","prepared","signals",".","For","example",",","the","output","dictionary","may","be","the","following","``","`","{","'input_signal","'",":","input_signal_tensor",",","'target_signal","'",":","target_signal_tensor",",","'reference_signal","'",":","reference_signal_tensor",",","'embedding_vector","'",":","embedding_vector","}","``","`","Keys","in","the","output","dictionary","are","ordered","with","synchronous","signals","given","first",",","followed","by","asynchronous","signals","and","embedding",".","Args",":","sample_rate",":","sample","rate","used","for","all","audio","signals","random_offset",":","If","`","True","`",",","offset","will","be","randomized","when","loading","a","subsegment","from","a","file","."]
docstr: Convert a list of signals into a multi-channel signal by concatenating
  the elements of the list along the channel dimension.
  
  If input is not a list, it is returned unmodified.
  
  Args:
      signal: list of arrays
  
  Returns:
      Numpy array obtained by concatenating the elements of the list
      along the channel dimension (axis=0).
code: def list_to_multichannel(
      signal: Union[np.ndarray, List[np.ndarray]]
  ) -> np.ndarray:
      """Convert a list of signals into a multi-channel signal by concatenating
      the elements of the list along the channel dimension.
  
      If input is not a list, it is returned unmodified.
  
      Args:
          signal: list of arrays
  
      Returns:
          Numpy array obtained by concatenating the elements of the list
          along the channel dimension (axis=0).
      """
      if not isinstance(signal, list):
          # Nothing to do there
          return signal
      elif len(signal) == 0:
          # Nothing to do, return as is
          return signal
      elif len(signal) == 1:
          # Nothing to concatenate, return the original format
          return signal[0]
  
      # If multiple signals are provided in a list, we concatenate them along the channel dimension
      if signal[0].ndim == 1:
          # Single-channel individual files
          mc_signal = np.stack(signal, axis=0)
      elif signal[0].ndim == 2:
          # Multi-channel individual files
          mc_signal = np.concatenate(signal, axis=0)
      else:
          raise RuntimeError(
              f"Unexpected target with {signal[0].ndim} dimensions."
          )
  
      return mc_signal
  
imports: import abc
  import math
  import random
  from collections import OrderedDict, namedtuple
  from dataclasses import dataclass
  from typing import Callable, Dict, List, Optional, Tuple, Type, Union
  import librosa
  import numpy
  import torch
  from nemo.collections.asr.parts.preprocessing.segment import AudioSegment
  from nemo.collections.asr.parts.utils.audio_utils import ChannelSelectorType
  from nemo.collections.common.parts.preprocessing import collections
  from nemo.collections.common.parts.utils import flatten
  from nemo.core.classes import Dataset
  from nemo.core.neural_types import AudioSignal, EncodedRepresentation, LengthsType, NeuralType
  from nemo.utils import logging
label_desc: Use image node_id 21 for calling the ASRAudioProcessor obj's underlying member method code with example usage: obj.list_to_multichannel(signal) and returns: mc_signal, signal, signal, signal