code: def trim(input, axis, epsilon, name=None):
      """
      Trim the noise from beginning and end of the audio.
  
      Args:
        input: An audio Tensor.
        axis: The axis to trim.
        epsilon: The max value to be considered as noise.
        name: A name for the operation (optional).
      Returns:
        A tensor of start and stop with shape `[..., 2, ...]`.
      """
      shape = tf.shape(input, out_type=tf.int64)
      length = shape[axis]
  
      nonzero = tf.math.greater(input, epsilon)
      check = tf.reduce_any(nonzero, axis=axis)
  
      forward = tf.cast(nonzero, tf.int8)
      reverse = tf.reverse(forward, [axis])
  
      start = tf.where(check, tf.argmax(forward, axis=axis), length)
      stop = tf.where(
          check, tf.argmax(reverse, axis=axis), tf.constant(0, tf.int64)
      )
      stop = length - stop
  
      return tf.stack([start, stop], axis=axis)
  
imports: import sys
  import tensorflow
  from tensorflow_io.python.ops import core_ops
label_desc: Use image node_id 7 for calling a global function with example usage: trim(input, axis, epsilon, name) and returns: tf