def METHOD_NAME(self, output_names_with_port, onnx_feed_dict, origin_proto, op_type,
                    debug=False, rtol=1e-07, catch_errors=True):
    optimizers = OrderedDict([("optimize_einsum", EinsumOptimizer)])
    utils.make_sure(op_type is not None,
                    "op_type should be specified")
    utils.make_sure(self.config.is_onnxruntime_backend,
                    "only onnxruntime is supported to test transpose optimizer")
    origin_model_path = self.save_onnx_model(
        origin_proto, onnx_feed_dict, postfix="_origin")
    expected = self.run_onnxruntime(
        origin_model_path, onnx_feed_dict, output_names_with_port)
    new_proto, new_graph = GraphUtil.optimize_model_proto(
        origin_proto, catch_errors=catch_errors, return_graph=True, optimizers=optimizers)
    self.assertTrue(new_proto,
                    msg="model proto after optimizer should not be None")
    new_model_path = self.save_onnx_model(new_proto, onnx_feed_dict, postfix="_opt")
    # current = GraphUtil.get_node_count_from_onnx_graph(new_proto.graph)
    actual = self.run_onnxruntime(new_model_path, onnx_feed_dict, output_names_with_port)
    for expected_val, actual_val in zip(expected, actual):
        self.assertAllClose(expected_val, actual_val, rtol=rtol, atol=1e-5)
        self.assertEqual(expected_val.dtype, actual_val.dtype)
        self.assertEqual(expected_val.shape, actual_val.shape)
    self.assert_shapes_correct(new_graph, allow_missing=False, run_checker=True)
    return new_proto