code: def ConvFactory(
      data,
      num_filter,
      kernel,
      stride=(1, 1),
      pad=(0, 0),
      act_type="relu",
      mirror_attr={},
      with_act=True,
      dcn=False,
      name="",
  ):
      if not dcn:
          conv = mx.symbol.Convolution(
              data=data,
              num_filter=num_filter,
              kernel=kernel,
              stride=stride,
              pad=pad,
              no_bias=True,
              workspace=workspace,
              name=name + "_conv",
          )
      else:
          conv_offset = mx.symbol.Convolution(
              name=name + "_conv_offset",
              data=data,
              num_filter=18,
              pad=(1, 1),
              kernel=(3, 3),
              stride=(1, 1),
          )
          conv = mx.contrib.symbol.DeformableConvolution(
              name=name + "_conv",
              data=data,
              offset=conv_offset,
              num_filter=num_filter,
              pad=(1, 1),
              kernel=(3, 3),
              num_deformable_group=1,
              stride=stride,
              dilate=(1, 1),
              no_bias=False,
          )
      bn = mx.symbol.BatchNorm(
          data=conv,
          fix_gamma=False,
          momentum=bn_mom,
          eps=2e-5,
          name=name + "_bn",
      )
      if with_act:
          act = Act(bn, act_type, name=name + "_relu")
          # act = mx.symbol.Activation(
          #    data=bn, act_type=act_type, attr=mirror_attr, name=name+'_relu')
          return act
      else:
          return bn
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import mxnet
  import numpy
  from config import config
label_desc: Use image node_id 4 for calling a global function with example usage: ConvFactory(data, num_filter, kernel, stride, pad, act_type, mirror_attr, with_act, dcn, name) and returns: act, bn