code: def test_operator_with_state():
      def f_fc(a, b, weight, bias):
          x = a * b
          fc = nd.FullyConnected(x, weight, bias, num_hidden=32)
          return fc
  
      a = nd.uniform(shape=(64, 50))
      b = nd.uniform(shape=(64, 50))
      weight = nd.uniform(shape=(32, 50))
      bias = nd.uniform(shape=(32,))
  
      grad_func = grad_and_loss(f_fc)
      grad_vals, outputs = grad_func(a, b, weight, bias)
  
imports: import functools
  import mxnet.ndarray
  from mxnet.ndarray import zeros_like
  from mxnet.autograd import *
  from mxnet.test_utils import *
  from common import xfail_when_nonstandard_decimal_separator
  from mxnet.test_utils import environment
  import pytest
label_desc: Use image node_id 6 for calling a global function with example usage: test_operator_with_state() and returns: fc