code: def generate_proto(source, code_gen):
      """Invokes the Protocol Compiler to generate a _pb2.py from the given
      .proto file."""
      output = (
          source.replace(".proto", "_pb2.py")
          .replace("protos/src/proto/", "")
          .replace("protos/python/", "")
      )
  
      if not os.path.exists(source):
          sys.stderr.write("Can't find required file: %s\n" % source)
          sys.exit(-1)
  
      protoc_command = [
          code_gen,
          "-Iprotos/src/proto",
          "-Iprotos/python",
          "--python_out=.",
          source,
      ]
      if subprocess.call(protoc_command) != 0:
          sys.exit(-1)
  
file_path: turicreate/src/external/coremltools_wrap/coremltools/deps/protobuf/python/compatibility_tests/v2.5.0/setup.py
imports: import glob
  import os
  import subprocess
  import sys
  from setuptools import setup, Extension, find_packages
  from distutils.spawn import find_executable
label_desc: Use image node_id 1 for calling a global function with example usage: generate_proto(source, code_gen) without return types