code: def test_sparse_fc():
      def check_sparse_fc(batch_size, dim_in, dim_out, stype):
          data = rand_ndarray((batch_size, dim_in), stype, density=0.5)
          weight = rand_ndarray(
              (dim_out, dim_in), "row_sparse", density=1
          )
          bias = rand_ndarray((dim_out, 1), "row_sparse", density=1)
          out = mx.nd.sparse.FullyConnected(
              data, weight, num_hidden=dim_out, bias=bias
          )
          data_dns = data.tostype("default")
          weight_dns = weight.tostype("default")
          out_dns = mx.nd.FullyConnected(
              data_dns, weight_dns, num_hidden=dim_out, bias=bias
          )
          assert_almost_equal(out.asnumpy(), out_dns.asnumpy())
  
      # test FC with row_sparse weight w/ density=1, dense data
      check_sparse_fc(5, 10, 8, "default")
      # test FC with row_sparse weight w/ density=1, csr data (fallback)
      check_sparse_fc(5, 10, 8, "csr")
  
imports: import pickle
  from mxnet.ndarray import NDArray
  import mxnet
  from mxnet.test_utils import *
  from common import random_seed
  from mxnet.base import mx_real_t
  from numpy.testing import assert_allclose
  import numpy.random
  import numpy
  import scipy.sparse
  from common import assertRaises, xfail_when_nonstandard_decimal_separator
  from mxnet.ndarray.sparse import RowSparseNDArray, CSRNDArray
  import pytest
label_desc: Use image node_id 39 for calling a global function with example usage: test_sparse_fc() without return types