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: Get samples from multiple files with the same start and end point.
  
  Args:
      audio_files: list of paths to audio files
      sample_rate: desired sample rate for output samples
      duration: Optional desired duration of output samples.
              If `None`, the complete files will be loaded.
              If set, a segment of `duration` seconds will be loaded from
              all files. Segment is synchronized across files, so that
              start and end points are the same.
      channel_selectors: Optional channel selector for each signal, for selecting
                      a subset of channels.
      fixed_offset: Optional fixed offset when loading samples.
      random_offset: If `True`, offset will be randomized when loading a short segment
                  from a file. The value is randomized between fixed_offset and
                  max_offset (set depending on the duration and fixed_offset).
  
  Returns:
      List with the same size as `audio_files` but containing numpy arrays
      with samples from each audio file.
      Each array has shape (num_samples,) or (num_channels, num_samples), for single-
      or multi-channel signal, respectively.
      For example, if `audio_files = [path/to/file_1.wav, path/to/file_2.wav]`,
      the output will be a list `output = [samples_file_1, samples_file_2]`.
code: def get_samples_synchronized(
      cls,
      audio_files: List[str],
      sample_rate: int,
      duration: Optional[float] = None,
      channel_selectors: Optional[List[ChannelSelectorType]] = None,
      fixed_offset: float = 0,
      random_offset: bool = False,
  ) -> List[np.ndarray]:
      """Get samples from multiple files with the same start and end point.
  
      Args:
          audio_files: list of paths to audio files
          sample_rate: desired sample rate for output samples
          duration: Optional desired duration of output samples.
                  If `None`, the complete files will be loaded.
                  If set, a segment of `duration` seconds will be loaded from
                  all files. Segment is synchronized across files, so that
                  start and end points are the same.
          channel_selectors: Optional channel selector for each signal, for selecting
                          a subset of channels.
          fixed_offset: Optional fixed offset when loading samples.
          random_offset: If `True`, offset will be randomized when loading a short segment
                      from a file. The value is randomized between fixed_offset and
                      max_offset (set depending on the duration and fixed_offset).
  
      Returns:
          List with the same size as `audio_files` but containing numpy arrays
          with samples from each audio file.
          Each array has shape (num_samples,) or (num_channels, num_samples), for single-
          or multi-channel signal, respectively.
          For example, if `audio_files = [path/to/file_1.wav, path/to/file_2.wav]`,
          the output will be a list `output = [samples_file_1, samples_file_2]`.
      """
      if channel_selectors is None:
          channel_selectors = [None] * len(audio_files)
  
      if duration is None:
          # Load complete files starting from a fixed offset
          offset = fixed_offset  # fixed offset
          num_samples = None  # no constrain on the number of samples
  
      else:
          # Fixed duration of the output
          audio_durations = cls.get_duration(audio_files)
          min_audio_duration = min(audio_durations)
          available_duration = min_audio_duration - fixed_offset
  
          if available_duration <= 0:
              raise ValueError(
                  f"Fixed offset {fixed_offset}s is larger than shortest file {min_duration}s."
              )
  
          if duration + fixed_offset > min_audio_duration:
              # The shortest file is shorter than the requested duration
              logging.debug(
                  f"Shortest file ({min_audio_duration}s) is less than the desired duration {duration}s + fixed offset {fixed_offset}s. Returned signals will be shortened to {available_duration} seconds."
              )
              offset = fixed_offset
              duration = available_duration
          elif random_offset:
              # Randomize offset based on the shortest file
              max_offset = min_audio_duration - duration
              offset = random.uniform(fixed_offset, max_offset)
          else:
              # Fixed offset
              offset = fixed_offset
  
          # Fixed number of samples
          num_samples = math.floor(duration * sample_rate)
  
      output = []
  
      # Prepare segments
      for idx, audio_file in enumerate(audio_files):
          segment_samples = cls.get_samples_from_file(
              audio_file=audio_file,
              sample_rate=sample_rate,
              offset=offset,
              num_samples=num_samples,
              channel_selector=channel_selectors[idx],
          )
          output.append(segment_samples)
  
      return output
  
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 18 for calling the ASRAudioProcessor obj's underlying member method code with example usage: obj.get_samples_synchronized(cls, audio_files, sample_rate, duration, channel_selectors, fixed_offset, random_offset) and returns: output