code: def check_all_connected_from_inputs(onnx_model):
      edge_names = get_initializer_names(onnx_model) | _get_input_names(
          onnx_model
      )
      # Nodes which are not connected from the network inputs.
      orphan_nodes = []
      for node in onnx_model.graph.node:
          if not node.input:
              for output_name in node.output:
                  edge_names.add(output_name)
              continue
          if not edge_names.intersection(node.input):
              orphan_nodes.append(node)
          for output_name in node.output:
              edge_names.add(output_name)
      assert not (orphan_nodes), "{}".format(orphan_nodes)
  
imports: import glob
  import os
  import unittest
  import chainer
  import numpy
  import onnx
  import pytest
  from onnx_chainer.testing.get_test_data_set import gen_test_data_set
label_desc: Use image node_id 2 for calling a global function with example usage: check_all_connected_from_inputs(onnx_model) without return types