def METHOD_NAME(ctrl, path_to_onnx, ref_orig_weights, expected_num_nodes):
    ctrl.export_model(path_to_onnx)
    onnx_model = onnx.load(path_to_onnx)
    conv_nodes = get_nodes_by_type(onnx_model, "Conv")
    inputs = [get_all_inputs_for_graph_node(conv_node, onnx_model.graph) for conv_node in conv_nodes]
    actual_orig_weights = [torch.from_numpy(weight) for input_dict in inputs for weight in input_dict.values()]
    assert all(torch.equal(ref, act) for ref, act in zip(ref_orig_weights, actual_orig_weights))
    assert len(onnx_model.graph.node) == expected_num_nodes