code: def _predict(workspace_id, predict_net, model, tensorizers, input):
      workspace.SwitchWorkspace(workspace_id)
      tensor_dict = {
          name: tensorizer.prepare_input(input)
          for name, tensorizer in tensorizers.items()
      }
      model_inputs = model.arrange_caffe2_model_inputs(tensor_dict)
      model_input_names = model.get_export_input_names(tensorizers)
      vocab_to_export = model.vocab_to_export(tensorizers)
      for blob_name, model_input in zip(
          model_input_names, model_inputs
      ):
          converted_blob_name = blob_name
          dtype = np.float32
          if blob_name in vocab_to_export:
              converted_blob_name = convert_caffe2_blob_name(blob_name)
              dtype = str
  
          workspace.blobs[converted_blob_name] = np.array(
              [model_input], dtype=dtype
          )
      workspace.RunNet(predict_net)
      return {
          str(blob): workspace.blobs[blob][0]
          for blob in predict_net.external_outputs
      }
  
file_path: pytext/pytext/__init__.py
imports: import json
  import logging
  import uuid
  from functools import lru_cache
  from typing import Callable, Mapping, Optional
  import numpy
  from caffe2.python import workspace
  from caffe2.python.predictor import predictor_exporter
  from pytext.data.sources.data_source import DataSource
  from pytext.task import load
  from pytext.task.new_task import NewTask
  from pytext.utils.file_io import PathManager, register_http_url_handler
  from pytext.workflow import _set_cuda
  from .builtin_task import register_builtin_tasks
  from .config import pytext_config_from_json, PyTextConfig
  from .utils.onnx import CAFFE2_DB_TYPE, convert_caffe2_blob_name
label_desc: Use image node_id 1 for calling a global function with example usage: _predict(workspace_id, predict_net, model, tensorizers, input) and returns: unknown