class_docstr: Generate MediaPipe Python protobuf files by Protocol Compiler.
class_docstr_tok: ["Generate","MediaPipe","Python","protobuf","files","by","Protocol","Compiler","."]
docstr: Invokes the Protocol Compiler to generate a _pb2.py.
code: def _generate_proto(self, source):
      """Invokes the Protocol Compiler to generate a _pb2.py."""
      output = os.path.join(
          self.build_lib, source.replace(".proto", "_pb2.py")
      )
      if not os.path.exists(output):
          sys.stderr.write("generating proto file: %s\n" % output)
          protoc_command = [
              self._protoc,
              "-I.",
              "--python_out=" + os.path.abspath(self.build_lib),
              source,
          ]
          _invoke_shell_command(protoc_command)
  
imports: import glob
  import os
  import platform
  import posixpath
  import re
  import shlex
  import shutil
  import subprocess
  import sys
  import setuptools
  from setuptools.command import build_ext
  from setuptools.command import build_py
  from setuptools.command import install
label_desc: Use image node_id 3 for calling the GeneratePyProtos obj's underlying member method code with example usage: obj._generate_proto(source) without return types