code: def time_mask(input, param, name=None):
      """
      Apply masking to a spectrogram in the time domain.
  
      Args:
        input: An audio spectogram.
        param: Parameter of time 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.
      time_max = tf.shape(input)[0]
      t = tf.random.uniform(
          shape=(), minval=0, maxval=param, dtype=tf.dtypes.int32
      )
      t0 = tf.random.uniform(
          shape=(), minval=0, maxval=time_max - t, dtype=tf.dtypes.int32
      )
      indices = tf.reshape(tf.range(time_max), (-1, 1))
      condition = tf.math.logical_and(
          tf.math.greater_equal(indices, t0),
          tf.math.less(indices, t0 + t),
      )
      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 9 for calling a global function with example usage: time_mask(input, param, name) and returns: tf