code: def get_caffe_pb():
      """
      Get caffe protobuf.
  
      Returns:
          The imported caffe protobuf module.
      """
      dir = get_dataset_path("caffe")
      caffe_pb_file = os.path.join(dir, "caffe_pb2.py")
      if not os.path.isfile(caffe_pb_file):
          download(CAFFE_PROTO_URL, dir)
          assert os.path.isfile(os.path.join(dir, "caffe.proto"))
  
          cmd = "protoc --version"
          version, ret = subproc_call(cmd, timeout=3)
          if ret != 0:
              sys.exit(1)
          try:
              version = version.decode("utf-8")
              version = float(
                  ".".join(version.split(" ")[1].split(".")[:2])
              )
              assert version >= 2.7, "Require protoc>=2.7 for Python3"
          except Exception:
              logger.exception(
                  "protoc --version gives: " + str(version)
              )
              raise
  
          cmd = "cd {} && protoc caffe.proto --python_out .".format(dir)
          ret = os.system(cmd)
          assert ret == 0, "Command `{}` failed!".format(cmd)
          assert os.path.isfile(caffe_pb_file), caffe_pb_file
      import imp
  
      return imp.load_source("caffepb", caffe_pb_file)
  
file_path: tensorpack/tensorpack/utils/loadcaffe.py
imports: import numpy
  import os
  import sys
  from .None import logger
  from .concurrency import subproc_call
  from .fs import download, get_dataset_path
  from .utils import change_env
label_desc: Use image node_id 2 for calling a global function with example usage: get_caffe_pb() and returns: imp