def compile_protofile(proto_file_path):
out_file = tempfile.mkstemp()[<NUM_LIT:1>]<EOL>try:<EOL><INDENT>subprocess.check_output(['<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>', out_file,<EOL>proto_file_path])<EOL><DEDENT>except subprocess.CalledProcessError as e:<EOL><INDENT>sys.exit('<STR_LIT>'.format(e.returncode))<EOL><DEDENT>return out_file<EOL>
Compile proto file to descriptor set.

    Args:
        proto_file_path: Path to proto file to compile.

    Returns:
        Path to file containing compiled descriptor set.

    Raises:
        SystemExit if the compilation fails.