def _process_io(graph: GraphProto, ios: dict[str, OnnxIO], graph_idx: int):
        """Process inputs, outputs, and initializers in the graph.

        This will populate ios. Should be called before adding nodes.

        :param graph: ONNX graph.
        :param ios: dictionary to store the inputs, outputs, and initializers.
        :param graph_idx: index of the graph in the model.
        """
        error_message = (
            "%s %s already exists in the graph. Will use the latest definition. If they are different, please fix the"
            " model with unique names."
        )

        for i in graph.input:
            if i.name in ios:
                logger.warning(error_message, "Input", i.name)
            ios[i.name] = OnnxIO(proto=[i], source=SpecialInput.INPUT, graph_idx=graph_idx)
        for o in graph.output:
            if o.name in ios:
                logger.warning(error_message, "Output", o.name)
            ios[o.name] = OnnxIO(proto=[o], destination=[SpecialOutput.OUTPUT], graph_idx=graph_idx)
        for initializer in graph.initializer:
            if initializer.name in ios and not SpecialInput.is_initializer(ios[initializer.name].source):
                # already exists as an input
                io = ios[initializer.name]
                io.proto.append(initializer)
                io.source = SpecialInput.INPUT_INITIALIZER
            elif initializer.name in ios:
                # already exists as an input_initializer or initializer
                # replace the existing proto at proto[-1]
                logger.warning(error_message, "Initializer", initializer.name)
                ios[initializer.name].proto[-1] = initializer
            else:
                # new initializer
                ios[initializer.name] = OnnxIO(
                    proto=[initializer],
                    source=SpecialInput.INITIALIZER,
                    graph_idx=graph_idx,
                )
        for vi in graph.value_info:
            if vi.name not in ios:
                ios[vi.name] = OnnxIO(proto=[vi], graph_idx=graph_idx)
        return ios
Process inputs, outputs, and initializers in the graph.

        This will populate ios. Should be called before adding nodes.

        :param graph: ONNX graph.
        :param ios: dictionary to store the inputs, outputs, and initializers.
        :param graph_idx: index of the graph in the model.
        
olive/passes/onnx/onnx_dag.py