code: def analyze_levels(
      array: np.ndarray, name: str, config: Config
  ) -> (
      np.ndarray,
      np.ndarray,
      np.ndarray,
      np.ndarray,
      float,
      float,
      float,
  ):
      name = name.upper()
      debug(f"Calculating mid and side channels of the {name}...")
      mid, side = lr_to_ms(array)
      del array
  
      array_size, divisions, piece_size = __calculate_piece_sizes(
          mid, config.max_piece_size, name, config.internal_sample_rate
      )
  
      unfolded_mid, rmses, average_rms = get_average_rms(
          mid, piece_size, divisions, name
      )
      unfolded_side = unfold(side, piece_size, divisions)
  
      (
          mid_loudest_pieces,
          side_loudest_pieces,
          match_rms,
      ) = __extract_loudest_pieces(
          rmses, average_rms, unfolded_mid, unfolded_side, name
      )
  
      return (
          mid,
          side,
          mid_loudest_pieces,
          side_loudest_pieces,
          match_rms,
          divisions,
          piece_size,
      )
  
file_path: matchering/matchering/stage_helpers/match_levels.py
imports: import numpy
  from ..log import debug
  from ..None import Config
  from ..utils import to_db
  from ..dsp import lr_to_ms, size, unfold, batch_rms, rms, amplify, normalize
label_desc: Use image node_id 8 for calling a global function with example usage: analyze_levels(array, name, config) and returns: mid,  side,  mid_loudest_pieces,  side_loudest_pieces,  match_rms,  divisions,  piece_size