code: def function_fc_add(
      data_shape,
      add_op,
      quantize_mode,
      fc_out_add,
      flatten,
      relu,
      out_type,
  ):
      class FCWithSumExample(nn.HybridBlock):
          def __init__(self, num_hidden, add_op, fc_out_add, **kwargs):
              super(FCWithSumExample, self).__init__(**kwargs)
              self.fca = nn.Dense(units=num_hidden, flatten=flatten)
              self.elemwise_add = add_op == "elemwise_add"
              self.fc_out_as_rhs = fc_out_add == "rhs"
              self.relu = relu == "leaky_relu"
  
          def forward(self, data1a, data2):
              fc_out = self.fca(data1a)
              if self.relu:
                  fc_out = mx.npx.leaky_relu(fc_out, act_type="gelu")
              if self.fc_out_as_rhs:
                  if self.elemwise_add:
                      sum1 = mx.nd.elemwise_add(
                          data2.as_nd_ndarray(), fc_out.as_nd_ndarray()
                      ).as_np_ndarray()
                  else:
                      sum1 = data2 + fc_out
              else:
                  if self.elemwise_add:
                      sum1 = mx.nd.elemwise_add(
                          fc_out.as_nd_ndarray(), data2.as_nd_ndarray()
                      ).as_np_ndarray()
                  else:
                      sum1 = fc_out + data2
              return sum1
  
      attrs = {"fc": {"with_sum": "true"}}
      if quantize_mode is not None:
          attrs["fc"]["quantized"] = "true"
          if quantize_mode == "smart":
              attrs["fc"][
                  "enabled_float_output"
              ] = mx.nd.get_dtype_name(mx.np.float32)
      num_hidden = 10
      net = FCWithSumExample(num_hidden, add_op, fc_out_add)
      if flatten:
          data_shapes = [data_shape, (data_shape[0], num_hidden)]
      else:
          data_shapes = [data_shape, (*data_shape[0:-1], num_hidden)]
      check_fusion(
          net,
          data_shapes,
          attrs,
          out_types=[out_type],
          check_fusion=(quantize_mode is None),
          check_quantization=(quantize_mode is not None) and flatten,
          quantize_mode=quantize_mode,
      )
  
imports: import mxnet
  import pytest
  from subgraph_common import check_fusion, check_neg_fusion, check_neg_fusion_quantized, check_quantize
  from subgraph_common import CustomNormalInit, DATA_SHAPE, TailNegBlock
  from mxnet.contrib import quantization
  from mxnet.gluon import nn
  from mxnet.test_utils import assert_almost_equal_with_err
label_desc: Use image node_id 10 for calling a global function with example usage: function_fc_add(data_shape, add_op, quantize_mode, fc_out_add, flatten, relu, out_type) and returns: sum1