code: def normalize(inputs, epsilon=1e-8, scope="ln"):
      """Applies layer normalization.
  
      Args:
        inputs: A tensor with 2 or more dimensions, where the first dimension has
          `batch_size`.
        epsilon: A floating number. A very small number for preventing ZeroDivision Error.
        scope: Optional scope for `variable_scope`.
        reuse: Boolean, whether to reuse the weights of a previous layer
          by the same name.
  
      Returns:
        A tensor with the same shape and data dtype as `inputs`.
      """
      with tf.variable_scope(scope):
          inputs_shape = inputs.get_shape()
          params_shape = inputs_shape[-1:]
  
          mean, variance = tf.nn.moments(inputs, [-1], keep_dims=True)
          beta = tf.Variable(tf.zeros(params_shape))
          gamma = tf.Variable(tf.ones(params_shape))
          normalized = (inputs - mean) / ((variance + epsilon) ** (0.5))
          outputs = gamma * normalized + beta
  
      return outputs
  
file_path: nni/examples/trials/ga_squad/graph_to_tf.py
imports: import tensorflow
  from rnn import XGRUCell
  from util import dropout
  from graph import LayerType
label_desc: Use image node_id 1 for calling a global function with example usage: normalize(inputs, epsilon, scope) and returns: outputs