code: def test_create_graph(self):  # type: () -> None
      kernel_shape = (3, 2)
      strides = (2, 3)
      pads = (4, 2, 4, 2)
      dilations = (1, 2)
      group = 1
      weight = numpy_helper.from_array(
          _random_array((16, 3, 3, 2)), name="weight"
      )
  
      input_shape = (1, 3, 224, 224)
      output_size = _conv_pool_output_size(
          input_shape, dilations, kernel_shape, pads, strides
      )
  
      output_shape = (
          1,
          int(weight.dims[0]),
          output_size[0],
          output_size[1],
      )
  
      inputs = [("input0", input_shape)]
      outputs = [("output0", output_shape, TensorProto.FLOAT)]
  
      conv = helper.make_node(
          "Conv",
          inputs=[inputs[0][0], "weight"],
          outputs=["conv_output"],
          dilations=dilations,
          group=group,
          kernel_shape=kernel_shape,
          pads=pads,
          strides=strides,
      )
  
      relu = helper.make_node(
          "Relu", inputs=[conv.output[0]], outputs=[outputs[0][0]]
      )
  
      model = _onnx_create_model(
          [conv, relu], inputs, outputs, [weight]
      )
      graph_ = Graph.from_onnx(model.graph, onnx_ir_version=5)
      self.assertTrue(len(graph_.inputs) == 1)
      self.assertEqual(graph_.inputs[0][2], input_shape)
      self.assertTrue(len(graph_.outputs) == 1)
      self.assertEqual(graph_.outputs[0][2], output_shape)
      self.assertTrue(len(graph_.nodes) == 2)
      self.assertEqual(len(graph_.nodes[0].parents), 0)
      self.assertEqual(len(graph_.nodes[1].parents), 1)
      self.assertEqual(len(graph_.nodes[0].children), 1)
      self.assertEqual(len(graph_.nodes[1].children), 0)
  
file_path: turicreate/src/external/coremltools_wrap/coremltools/coremltools/converters/onnx/_tests/test_graph.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import unittest
  from coremltools._deps import _HAS_ONNX, MSG_ONNX_NOT_FOUND
label_desc: Use image node_id 1 for calling the GraphTest obj's underlying member method code with example usage: obj.test_create_graph() without return types