code: def test_backward_infer():
      w = mx.sym.Variable("weight")
      wshift = mx.sym.Variable("wshift", shape=(1,))
      data = mx.sym.Variable("data")
      # broadcast add here, not being able to deduce shape correctly
      wt = mx.sym.broadcast_add(w, wshift)
      # shape constraint, this is what enables backward shape inference
      wt = mx.symbol._internal._identity_with_attr_like_rhs(wt, w)
      net = mx.sym.FullyConnected(
          data=data, weight=wt, num_hidden=11, no_bias=True
      )
      data_shape = (7, 100)
      arg_shapes, out_shapes, aux_shapes = net.infer_shape(
          data=data_shape
      )
      arg_shape_dict = dict(zip(net.list_arguments(), arg_shapes))
      true_shapes = {"weight": (11, 100)}
      for k, v in true_shapes.items():
          assert arg_shape_dict[k] == v
  
file_path: mxnet/tests/python/unittest/test_infer_shape.py
imports: import mxnet
  from common import models
  import pytest
label_desc: Use image node_id 3 for calling a global function with example usage: test_backward_infer() without return types