<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def compile_proto(source, python_out, proto_path):
 """Invoke Protocol Compiler to generate python from given source .proto."""

  if not protoc:
    sys.exit('protoc not found. Is the protobuf-compiler installed?\n')

  protoc_command = [
      protoc,
      '--proto_path', proto_path,
      '--python_out', python_out,
      source,
  ]
  if subprocess.call(protoc_command) != 0:
    sys.exit('Make sure your protoc version >= 2.6. You can use a custom '
             'protoc by setting the PROTOC environment variable.')