code: def get_dropout(x, rate=0.0, init=True):
      """Dropout x with dropout_rate = rate.
  
      Apply zero dropout during init or prediction time.
  
      Args:
        x: 4-D Tensor, shape=(NHWC).
        rate: Dropout rate.
        init: Initialization.
      Returns:
        x: activations after dropout.
      """
      if init or rate == 0:
          return x
      return tf.layers.dropout(x, rate=rate, training=True)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import functools
  import numpy
  import scipy
  from tensor2tensor.layers import common_layers
  from tensor2tensor.layers import common_video
  from tensor2tensor.utils import contrib
  import tensorflow.compat.v1
  from tensorflow.compat.v1 import estimator
  import tensorflow_probability
label_desc: Use image node_id 11 for calling a global function with example usage: get_dropout(x, rate, init) and returns: tf, x