code: def proto_compile(output_path):
      import grpc_tools.protoc
  
      cli_args = [
          "grpc_tools.protoc",
          "--proto_path=hivemind/proto",
          f"--python_out={output_path}",
      ] + glob.glob("hivemind/proto/*.proto")
  
      code = grpc_tools.protoc.main(cli_args)
      if (
          code
      ):  # hint: if you get this error in jupyter, run in console for richer error message
          raise ValueError(
              f"{' '.join(cli_args)} finished with exit code {code}"
          )
      # Make pb2 imports in generated scripts relative
      for script in glob.iglob(f"{output_path}/*.py"):
          with open(script, "r+") as file:
              code = file.read()
              file.seek(0)
              file.write(
                  re.sub(r"\n(import .+_pb2.*)", "from . \\1", code)
              )
              file.truncate()
  
imports: import codecs
  import glob
  import hashlib
  import os
  import platform
  import re
  import subprocess
  import tarfile
  import tempfile
  import urllib.request
  from pkg_resources import parse_requirements, parse_version
  from setuptools import find_packages, setup
  from setuptools.command.build_py import build_py
  from setuptools.command.develop import develop
label_desc: Use image node_id 2 for calling a global function with example usage: proto_compile(output_path) without return types