prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Need check whether protoc existed.
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `variables.py`
  Content:
  ```
  1 # Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
  2 #
  3 # Licensed under the Apache License, Version 2.0 (the "License");
  4 # you may not use this file except in compliance with the License.
  5 # You may obtain a copy of the License at
  6 #
  7 #     http://www.apache.org/licenses/LICENSE-2.0
  8 #
  9 # Unless required by applicable law or agreed to in writing, software
  10 # distributed under the License is distributed on an "AS IS" BASIS,
  11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12 # See the License for the specific language governing permissions and
  13 # limitations under the License.
  14 
  15 from onnx import helper, onnx_pb2, TensorProto
  16 import paddle.fluid.core as core
  17 
  18 
  19 def paddle_variable_to_onnx_tensor(paddle_var_name, block):
  20     # TODO(varunarora): Need to do this only in the case of VarType.LOD_TENSOR.
  21     paddle_var = block.var(paddle_var_name)
  22     return helper.make_tensor_value_info(
  23         paddle_var_name, PADDLE_TO_ONNX_DTYPE[paddle_var.dtype],
  24         paddle_var.shape)
  25 
  26 
  27 PADDLE_TO_ONNX_DTYPE = {
  28     core.VarDesc.VarType.FP32: onnx_pb2.TensorProto.FLOAT,
  29     core.VarDesc.VarType.FP64: onnx_pb2.TensorProto.FLOAT16,
  30     # '': onnx_pb2.TensorProto.DOUBLE,
  31     core.VarDesc.VarType.INT32: onnx_pb2.TensorProto.INT32,
  32     core.VarDesc.VarType.INT16: onnx_pb2.TensorProto.INT16,
  33     # '': onnx_pb2.TensorProto.INT8,
  34     # '': onnx_pb2.TensorProto.UINT8,
  35     core.VarDesc.VarType.INT16: onnx_pb2.TensorProto.UINT16,
  36     core.VarDesc.VarType.INT64: onnx_pb2.TensorProto.INT64,
  37     # '': onnx_pb2.TensorProto.STRING,
  38     # '': onnx_pb2.TensorProto.COMPLEX64,
  39     # '': onnx_pb2.TensorProto.COMPLEX128,
  40     core.VarDesc.VarType.BOOL: onnx_pb2.TensorProto.BOOL
  41 }
  42
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/variables.py b/variables.py
  --- a/variables.py
  +++ b/variables.py
  @@ -19,9 +19,9 @@
   def paddle_variable_to_onnx_tensor(paddle_var_name, block):
       # TODO(varunarora): Need to do this only in the case of VarType.LOD_TENSOR.
       paddle_var = block.var(paddle_var_name)
  -    return helper.make_tensor_value_info(
  -        paddle_var_name, PADDLE_TO_ONNX_DTYPE[paddle_var.dtype],
  -        paddle_var.shape)
  +    return helper.make_tensor_value_info(paddle_var_name,
  +                                         PADDLE_TO_ONNX_DTYPE[paddle_var.dtype],
  +                                         paddle_var.shape)
   
   
   PADDLE_TO_ONNX_DTYPE = {
  
verification_info: {"golden_diff": "diff --git a/variables.py b/variables.py\n--- a/variables.py\n+++ b/variables.py\n@@ -19,9 +19,9 @@\n def paddle_variable_to_onnx_tensor(paddle_var_name, block):\n     # TODO(varunarora): Need to do this only in the case of VarType.LOD_TENSOR.\n     paddle_var = block.var(paddle_var_name)\n-    return helper.make_tensor_value_info(\n-        paddle_var_name, PADDLE_TO_ONNX_DTYPE[paddle_var.dtype],\n-        paddle_var.shape)\n+    return helper.make_tensor_value_info(paddle_var_name,\n+                                         PADDLE_TO_ONNX_DTYPE[paddle_var.dtype],\n+                                         paddle_var.shape)\n \n \n PADDLE_TO_ONNX_DTYPE = {\n", "issue": "Need check whether protoc existed.\n\n", "before_files": [{"content": "# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom onnx import helper, onnx_pb2, TensorProto\nimport paddle.fluid.core as core\n\n\ndef paddle_variable_to_onnx_tensor(paddle_var_name, block):\n    # TODO(varunarora): Need to do this only in the case of VarType.LOD_TENSOR.\n    paddle_var = block.var(paddle_var_name)\n    return helper.make_tensor_value_info(\n        paddle_var_name, PADDLE_TO_ONNX_DTYPE[paddle_var.dtype],\n        paddle_var.shape)\n\n\nPADDLE_TO_ONNX_DTYPE = {\n    core.VarDesc.VarType.FP32: onnx_pb2.TensorProto.FLOAT,\n    core.VarDesc.VarType.FP64: onnx_pb2.TensorProto.FLOAT16,\n    # '': onnx_pb2.TensorProto.DOUBLE,\n    core.VarDesc.VarType.INT32: onnx_pb2.TensorProto.INT32,\n    core.VarDesc.VarType.INT16: onnx_pb2.TensorProto.INT16,\n    # '': onnx_pb2.TensorProto.INT8,\n    # '': onnx_pb2.TensorProto.UINT8,\n    core.VarDesc.VarType.INT16: onnx_pb2.TensorProto.UINT16,\n    core.VarDesc.VarType.INT64: onnx_pb2.TensorProto.INT64,\n    # '': onnx_pb2.TensorProto.STRING,\n    # '': onnx_pb2.TensorProto.COMPLEX64,\n    # '': onnx_pb2.TensorProto.COMPLEX128,\n    core.VarDesc.VarType.BOOL: onnx_pb2.TensorProto.BOOL\n}\n", "path": "variables.py"}], "after_files": [{"content": "# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom onnx import helper, onnx_pb2, TensorProto\nimport paddle.fluid.core as core\n\n\ndef paddle_variable_to_onnx_tensor(paddle_var_name, block):\n    # TODO(varunarora): Need to do this only in the case of VarType.LOD_TENSOR.\n    paddle_var = block.var(paddle_var_name)\n    return helper.make_tensor_value_info(paddle_var_name,\n                                         PADDLE_TO_ONNX_DTYPE[paddle_var.dtype],\n                                         paddle_var.shape)\n\n\nPADDLE_TO_ONNX_DTYPE = {\n    core.VarDesc.VarType.FP32: onnx_pb2.TensorProto.FLOAT,\n    core.VarDesc.VarType.FP64: onnx_pb2.TensorProto.FLOAT16,\n    # '': onnx_pb2.TensorProto.DOUBLE,\n    core.VarDesc.VarType.INT32: onnx_pb2.TensorProto.INT32,\n    core.VarDesc.VarType.INT16: onnx_pb2.TensorProto.INT16,\n    # '': onnx_pb2.TensorProto.INT8,\n    # '': onnx_pb2.TensorProto.UINT8,\n    core.VarDesc.VarType.INT16: onnx_pb2.TensorProto.UINT16,\n    core.VarDesc.VarType.INT64: onnx_pb2.TensorProto.INT64,\n    # '': onnx_pb2.TensorProto.STRING,\n    # '': onnx_pb2.TensorProto.COMPLEX64,\n    # '': onnx_pb2.TensorProto.COMPLEX128,\n    core.VarDesc.VarType.BOOL: onnx_pb2.TensorProto.BOOL\n}\n", "path": "variables.py"}]}