def _find_matmul_nodes(cls, graph: onnx.GraphProto) -> list[str]:
        """Find all MatMul nodes in the graph and return their names."""
        matmul_nodes = []
        for node in graph.node:
            for attr in node.attribute:
                if attr.type == onnx.AttributeProto.GRAPH:
                    # recursive call to take care of sub-graph
                    matmul_nodes += cls._find_matmul_nodes(attr.g)
                elif attr.type == onnx.AttributeProto.GRAPHS:
                    for subgraph in attr.graphs:
                        # recursive call to take care of sub-graph
                        matmul_nodes += cls._find_matmul_nodes(subgraph)
            if node.op_type == "MatMul":
                matmul_nodes.append(node.name)

        return matmul_nodes
Find all MatMul nodes in the graph and return their names.
olive/passes/onnx/bnb_quantization.py