code: def get_crossfade_mask_pair(
      length: int, equal_energy=True
  ) -> Tuple[np.array, np.array]:
      """
      Equal-gain or equal-energy (within ~1%) cross-fade mask pair with
      smooth start and end.
      https://signalsmith-audio.co.uk/writing/2021/cheap-energy-crossfade/
      """
      x = np.linspace(0, 1, length, dtype=np.float32)
      x2 = 1 - x
      a = x * x2
      k = 1.4186 if equal_energy else -0.70912
      b = a * (1 + k * a)
      c = b + x
      d = b + x2
      fade_in = c * c
      fade_out = d * d
      return fade_in, fade_out
  
file_path: audiomentations/audiomentations/core/utils.py
imports: import os
  from functools import lru_cache
  from pathlib import Path
  from typing import List, Union, Tuple
  import math
  import numpy
  from numpy.typing import NDArray
label_desc: Use image node_id 12 for calling a global function with example usage: get_crossfade_mask_pair(length, equal_energy) and returns: fade_in,  fade_out