code: def get_bn_variables(n_out, use_scale, use_bias, gamma_init):
      if use_bias:
          beta = tf.get_variable(
              "beta", [n_out], initializer=tf.constant_initializer()
          )
      else:
          beta = tf.zeros([n_out], name="beta")
      if use_scale:
          gamma = tf.get_variable(
              "gamma", [n_out], initializer=gamma_init
          )
      else:
          gamma = tf.ones([n_out], name="gamma")
      # x * gamma + beta
  
      moving_mean = tf.get_variable(
          "mean/EMA",
          [n_out],
          initializer=tf.constant_initializer(),
          trainable=False,
      )
      moving_var = tf.get_variable(
          "variance/EMA",
          [n_out],
          initializer=tf.constant_initializer(1.0),
          trainable=False,
      )
      return beta, gamma, moving_mean, moving_var
  
file_path: tensorpack/tensorpack/models/_old_batch_norm.py
imports: import tensorflow
  from tensorflow.contrib.framework import add_model_variable
  from tensorflow.python.training import moving_averages
  from ..tfutils.common import get_tf_version_tuple
  from ..tfutils.tower import get_current_tower_context
  from ..utils import logger
  from ..utils.argtools import get_data_format
  from .common import VariableHolder, layer_register
  from .tflayer import convert_to_tflayer_args
label_desc: Use image node_id 1 for calling a global function with example usage: get_bn_variables(n_out, use_scale, use_bias, gamma_init) and returns: beta,  gamma,  moving_mean,  moving_var