def _get_all_inputs(models: list[ModelProto]) -> list[ValueInfoProto]:
    """Collect unique inputs from all `models` into a single list."""
    inputs: list[ValueInfoProto] = []
    input_names: set[str] = set()
    for model in models:
        for inp in model.graph.input:
            if inp.name not in input_names:
                input_names.add(inp.name)
                inputs.append(inp)

    return inputs
Collect unique inputs from all `models` into a single list.
olive/passes/onnx/merge_decoders.py