code: def check(
      array: np.ndarray, sample_rate: int, config: Config, name: str
  ) -> (np.ndarray, int):
      name = name.upper()
  
      __check_length(
          array,
          sample_rate,
          config.max_length * sample_rate,
          config.fft_size * sample_rate // config.internal_sample_rate,
          name,
          Code.ERROR_TARGET_LENGTH_IS_EXCEEDED
          if name == "TARGET"
          else Code.ERROR_REFERENCE_LENGTH_LENGTH_IS_EXCEEDED,
          Code.ERROR_TARGET_LENGTH_IS_TOO_SMALL
          if name == "TARGET"
          else Code.ERROR_REFERENCE_LENGTH_LENGTH_TOO_SMALL,
      )
  
      array = __check_channels(
          array,
          Code.INFO_TARGET_IS_MONO
          if name == "TARGET"
          else Code.INFO_REFERENCE_IS_MONO,
          Code.ERROR_TARGET_NUM_OF_CHANNELS_IS_EXCEEDED
          if name == "TARGET"
          else Code.ERROR_REFERENCE_NUM_OF_CHANNELS_IS_EXCEEDED,
      )
  
      array, sample_rate = __check_sample_rate(
          array,
          sample_rate,
          config.internal_sample_rate,
          name,
          warning if name == "TARGET" else info,
          Code.WARNING_TARGET_IS_RESAMPLED
          if name == "TARGET"
          else Code.INFO_REFERENCE_IS_RESAMPLED,
      )
  
      if name == "TARGET":
          __check_clipping_limiting(
              array,
              config.clipping_samples_threshold,
              config.limited_samples_threshold,
              Code.WARNING_TARGET_IS_CLIPPING,
              Code.WARNING_TARGET_LIMITER_IS_APPLIED,
          )
  
      return array, sample_rate
  
file_path: matchering/matchering/checker.py
imports: import numpy
  from resampy import resample
  from .log import Code, warning, info, debug, ModuleError
  from .None import Config
  from .dsp import size, is_mono, is_stereo, mono_to_stereo, count_max_peaks
  from .utils import time_str
label_desc: Use image node_id 5 for calling a global function with example usage: check(array, sample_rate, config, name) and returns: array,  sample_rate