code: def fuse_batch_norm(dnn, block_name):
      """Fuses batch_norm into convolution
      As a result reduces inference time
      Should be used after training
      """
      bn_name = block_name + "_bn"
      if not dnn.has_layer(bn_name):
          # Batch norm has already been fused
          return
      bn_layer = dnn.layers[bn_name]
      conv_name = block_name + "_conv"
      conv_layer = dnn.layers[conv_name]
      # Fuse batch normalization
      conv_layer.apply_batch_normalization(bn_layer)
      # Delete layer from net (conv already 'contains' it)
      dnn.delete_layer(bn_name)
      # Connect layer after batchnorm to convolution
      # because batchnorm was removed from the dnn
      output_name = block_name + "_relu6"
      dnn.layers[output_name].connect(conv_layer)
  
file_path: neoml/NeoML/samples/python/cifar10.py
imports: import neoml
  import numpy
  import os
  import time
  import tarfile
label_desc: Use image node_id 8 for calling a global function with example usage: fuse_batch_norm(dnn, block_name) without return types