code: def _global_init_net(predictor_export_meta, db_type):
      net = core.Net("global-init")
      # manifold_db does not need DBReader
      if db_type != "manifold_db":
          net.Load(
              [predictor_constants.PREDICTOR_DBREADER],
              predictor_export_meta.parameters,
          )
          net.Proto().external_input.extend(
              [predictor_constants.PREDICTOR_DBREADER]
          )
          net.Proto().external_output.extend(
              predictor_export_meta.parameters
          )
  
      if predictor_export_meta.global_init_net:
          net.AppendNet(predictor_export_meta.global_init_net)
  
      # Add the model_id in the predict_net to the global_init_net
      utils.AddModelIdArg(predictor_export_meta, net.Proto())
      return net.Proto()
  
imports: from caffe2.proto import caffe2_pb2
  from caffe2.proto import metanet_pb2
  from caffe2.python import workspace, core, scope
  from caffe2.python.predictor_constants import predictor_constants
  import caffe2.python.predictor.serde
  import caffe2.python.predictor.predictor_py_utils
  import collections
label_desc: Use image node_id 3 for calling a global function with example usage: _global_init_net(predictor_export_meta, db_type) and returns: net