code: def test_constant(self):
      shape = [5, 5]
      values = np.float32(np.round(np.random.random(shape), 6))
      dummy_input = np.random.random([1])
  
      # Create one output (ValueInfoProto)
      Y = onnx.helper.make_tensor_value_info(
          "Y", onnx.TensorProto.FLOAT, values.shape
      )
  
      constant_node = onnx.helper.make_node(
          op_type="Constant",
          inputs=[],
          outputs=["Y"],
          value=onnx.helper.make_tensor(
              name="const_tensor",
              data_type=onnx.TensorProto.FLOAT,
              dims=values.shape,
              vals=values.flatten().tolist(),
          ),
      )
  
      # Create the graph (GraphProto)
      onnx_graph = onnx.helper.make_graph(
          nodes=[constant_node],
          name="test-constant",
          inputs=[],
          outputs=[Y],
      )
  
      # Create the model (ModelProto)
      onnx_model = onnx.helper.make_model(
          onnx_graph, producer_name="ONNX"
      )
      onnx.checker.check_model(onnx_model)
      loaded_model = load_model_proto(onnx_model)
  
      loaded_out = loaded_model.forward(dummy_input)
      expected_out = values
  
      assert np.array_equal(loaded_out, expected_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 TestConstant obj's underlying member method code with example usage: obj.test_constant() without return types