code: def slim_batchnorm_arg_scope(is_training, activation_fn=None):
      """Create a scope for applying BatchNorm in slim.
  
      This scope also applies Glorot initializiation to convolutional weights.
      Args:
        is_training: Whether this is a training run.
        activation_fn: Whether we apply an activation_fn to the convolution result.
  
      Returns:
        scope: Use this scope to automatically apply BatchNorm and Xavier Init to
          slim.conv2d and slim.fully_connected.
      """
      batch_norm_params = {
          "is_training": is_training,
          "decay": 0.999,
          "epsilon": 0.001,
          "variables_collections": {
              "beta": None,
              "gamma": None,
              "moving_mean": "moving_vars",
              "moving_variance": "moving_vars",
          },
      }
  
      with slim.arg_scope(
          [slim.conv2d, slim.fully_connected, slim.conv2d_transpose],
          weights_initializer=slim.initializers.xavier_initializer(),
          activation_fn=activation_fn,
          normalizer_fn=slim.batch_norm,
          normalizer_params=batch_norm_params,
      ) as scope:
          return scope
  
imports: import importlib
  import os
  import librosa
  import numpy
  import tensorflow.compat.v1
  import tf_slim
label_desc: Use image node_id 25 for calling a global function with example usage: slim_batchnorm_arg_scope(is_training, activation_fn) and returns: scope