code: def add_head_block(
      data,
      num_filter,
      setting_params,
      multiplier,
      head_pooling=False,
      kernel=(3, 3),
      stride=(2, 2),
      pad=(1, 1),
      name=None,
  ):
      bn_mom = setting_params["bn_mom"]
      bn_eps = setting_params["bn_eps"]
      fix_gamma = setting_params["fix_gamma"]
      use_global_stats = setting_params["use_global_stats"]
      workspace = setting_params["workspace"]
      act_type = setting_params["act_type"]
      channels = int(num_filter * multiplier)
  
      conv1 = mx.sym.Convolution(
          data=data,
          num_filter=channels,
          kernel=kernel,
          pad=pad,
          stride=stride,
          no_bias=True,
          num_group=1,
          workspace=workspace,
          name=name + "_conv1",
      )
      bn1 = mx.sym.BatchNorm(
          data=conv1,
          fix_gamma=fix_gamma,
          eps=bn_eps,
          momentum=bn_mom,
          use_global_stats=use_global_stats,
          name=name + "_conv1_bn",
      )
  
      act1 = Act(data=bn1, act_type=act_type, name=name + "_conv1_act")
  
      if head_pooling:
          head_data = mx.symbol.Pooling(
              data=act1,
              kernel=(3, 3),
              stride=(2, 2),
              pad=(1, 1),
              pool_type="max",
              name=name + "_max_pooling",
          )
      else:
          head_data = vargnet_block(
              data=act1,
              n_out_ch1=num_filter,
              n_out_ch2=num_filter,
              n_out_ch3=num_filter,
              setting_params=setting_params,
              factor=1,
              dim_match=False,
              multiplier=multiplier,
              kernel=kernel,
              stride=(2, 2),
              dilate=1,
              with_dilate=False,
              name=name + "_head_pooling",
          )
      return head_data
  
file_path: insightface/recognition/arcface_mxnet/symbol/vargfacenet.py
imports: import os
  import sys
  import mxnet
  import symbol_utils
  from config import config
label_desc: Use image node_id 8 for calling a global function with example usage: add_head_block(data, num_filter, setting_params, multiplier, head_pooling, kernel, stride, pad, name) and returns: head_data