code: def freq_mask(
      x, F=30, n_mask=2, replace_with_zero=True, inplace=False
  ):
      """freq mask for spec agument
  
      :param numpy.ndarray x: (time, freq)
      :param int n_mask: the number of masks
      :param bool inplace: overwrite
      :param bool replace_with_zero: pad zero on mask if true else use mean
      """
      if inplace and x.flags.writeable:
          cloned = x
      else:
          cloned = x.copy()
  
      num_mel_channels = cloned.shape[1]
      fs = numpy.random.randint(0, F, size=(n_mask, 2))
  
      for f, mask_end in fs:
          f_zero = random.randrange(0, num_mel_channels - f)
          mask_end += f_zero
  
          # avoids randrange error if values are equal and range is empty
          if f_zero == f_zero + f:
              continue
  
          if replace_with_zero:
              cloned[:, f_zero:mask_end] = 0
          else:
              cloned[:, f_zero:mask_end] = cloned.mean()
      return cloned
  
file_path: espnet/espnet/transform/spec_augment.py
imports: import random
  import numpy
  from espnet.transform.functional import FuncTrans
label_desc: Use image node_id 2 for calling a global function with example usage: freq_mask(x, F, n_mask, replace_with_zero, inplace) and returns: cloned