code: def freq_mask(input, param, name=None):
      """
      Apply masking to a spectrogram in the freq domain.
  
      Args:
        input: An audio spectogram.
        param: Parameter of freq masking.
        name: A name for the operation (optional).
      Returns:
        A tensor of spectrogram.
      """
      input = tf.convert_to_tensor(input)
      # TODO: Support audio with channel > 1.
      freq_max = tf.shape(input)[1]
      f = tf.random.uniform(
          shape=(), minval=0, maxval=param, dtype=tf.dtypes.int32
      )
      f0 = tf.random.uniform(
          shape=(), minval=0, maxval=freq_max - f, dtype=tf.dtypes.int32
      )
      indices = tf.reshape(tf.range(freq_max), (1, -1))
      condition = tf.math.logical_and(
          tf.math.greater_equal(indices, f0),
          tf.math.less(indices, f0 + f),
      )
      return tf.where(condition, tf.cast(0, input.dtype), input)
  
imports: import sys
  import tensorflow
  from tensorflow_io.python.ops import core_ops
label_desc: Use image node_id 8 for calling a global function with example usage: freq_mask(input, param, name) and returns: tf