code: def test_gemm(self):
      mata_shape = [2, 7]
      matb_shape = [7, 4]
      matc_shape = [2, 4]
      output_shape = [2, 4]
      alpha = np.round(np.random.rand(), 2)
      beta = np.round(np.random.rand(), 2)
      trans_a, trans_b = 0, 0
      input_x = np.random.random(mata_shape)
      b_val = np.random.random(matb_shape)
      c_val = np.random.random(matc_shape)
  
      # Create one output (ValueInfoProto)
      a = onnx.helper.make_tensor_value_info(
          "a", onnx.TensorProto.FLOAT, mata_shape
      )
      b = onnx.helper.make_tensor_value_info(
          "b", onnx.TensorProto.FLOAT, matb_shape
      )
      c = onnx.helper.make_tensor_value_info(
          "c", onnx.TensorProto.FLOAT, matc_shape
      )
      Y = onnx.helper.make_tensor_value_info(
          "Y", onnx.TensorProto.FLOAT, output_shape
      )
  
      init_b = onnx.helper.make_tensor(
          name="b",
          data_type=onnx.TensorProto.FLOAT,
          dims=matb_shape,
          vals=b_val.flatten().tolist(),
      )
  
      init_c = onnx.helper.make_tensor(
          name="c",
          data_type=onnx.TensorProto.FLOAT,
          dims=matc_shape,
          vals=c_val.flatten().tolist(),
      )
  
      gemm_node = onnx.helper.make_node(
          op_type="Gemm",
          inputs=["a", "b", "c"],
          outputs=["Y"],
          alpha=alpha,
          beta=beta,
          transA=trans_a,
          transB=trans_b,
      )
  
      # Create the graph (GraphProto)
      onnx_graph = onnx.helper.make_graph(
          nodes=[gemm_node],
          name="test-gather",
          inputs=[a, b, c],
          outputs=[Y],
          initializer=[init_b, init_c],
      )
  
      # Create the model (ModelProto)
      onnx_model = onnx.helper.make_model(
          onnx_graph, producer_name="ONNX"
      )
      onnx.checker.check_model(onnx_model)
  
      bigdl_model = Gemm(
          b_val,
          c_val,
          alpha=alpha,
          beta=beta,
          trans_a=trans_a,
          trans_b=trans_b,
      )
      loaded_model = load_model_proto(onnx_model)
  
      expected_out = bigdl_model.forward(input_x)
      loaded_out = loaded_model.forward(input_x)
  
      assert np.array_equal(expected_out, loaded_out)
  
imports: import onnx
  import pytest
  import numpy
  from bigdl.dllib.contrib.onnx.onnx_loader import load_model_proto
  from bigdl.dllib.nn.layer import CAddTable, JoinTable, ReLU
  from bigdl.dllib.nn.layer import SoftMax, SpatialAveragePooling, SpatialBatchNormalization
  from bigdl.dllib.nn.layer import SpatialConvolution, SpatialMaxPooling
  from bigdl.dllib.nn.layer import Unsqueeze
  from bigdl.dllib.nn.onnx.layer import Gemm, Reshape, Shape
label_desc: Use image node_id 1 for calling the TestGemm obj's underlying member method code with example usage: obj.test_gemm() without return types