docstr: Using the traced model, create a ScriptModule which has a nicer API that
  includes generating tensors from simple data types, and returns classified
  values according to the output layer (eg. as a dict mapping class name to score)
docstr_tok: ["Using","the","traced","model",",","create","a","ScriptModule","which","has","a","nicer","API","that","includes","generating","tensors","from","simple","data","types",",","and","returns","classified","values","according","to","the","output","layer","(","eg",".","as","a","dict","mapping","class","name","to","score",")"]
code: def torchscriptify(self, tensorizers, traced_model):
      """Using the traced model, create a ScriptModule which has a nicer API that
      includes generating tensors from simple data types, and returns classified
      values according to the output layer (eg. as a dict mapping class name to score)
      """
      right_script_tensorizer = tensorizers[
          "right_tokens"
      ].torchscriptify()
      middle_script_tensorizer = tensorizers[
          "middle_tokens"
      ].torchscriptify()
      left_script_tensorizer = tensorizers[
          "left_tokens"
      ].torchscriptify()
  
      return ScriptPyTextTriTowerModuleWithDense(
          model=traced_model,
          output_layer=self.output_layer.torchscript_predictions(),
          right_tensorizer=right_script_tensorizer,
          middle_tensorizer=middle_script_tensorizer,
          left_tensorizer=left_script_tensorizer,
          right_normalizer=tensorizers["right_dense"].normalizer,
          middle_normalizer=tensorizers["middle_dense"].normalizer,
          left_normalizer=tensorizers["left_dense"].normalizer,
      )
  
imports: from typing import Dict, List, Optional, Tuple, Union
  import torch
  from pytext.common.constants import Stage, TORCH_VERSION
  from pytext.config import ConfigBase
  from pytext.config.component import create_loss
  from pytext.data.roberta_tensorizer import RoBERTaTensorizer
  from pytext.data.tensorizers import FloatListTensorizer, LabelTensorizer, Tensorizer
  from pytext.loss import BinaryCrossEntropyLoss, MultiLabelSoftMarginLoss
  from pytext.models.decoders.mlp_decoder_n_tower import MLPDecoderNTower
  from pytext.models.decoders.mlp_decoder_tri_tower import MLPDecoderTriTower
  from pytext.models.model import BaseModel
  from pytext.models.module import create_module
  from pytext.models.output_layers import ClassificationOutputLayer
  from pytext.models.output_layers.doc_classification_output_layer import BinaryClassificationOutputLayer, MulticlassOutputLayer, MultiLabelOutputLayer
  from pytext.models.roberta import RoBERTaEncoder, RoBERTaEncoderBase
  from pytext.torchscript.module import ScriptPyTextTriTowerModuleWithDense
  from pytext.utils.label import get_label_weights
  from pytext.utils.usage import log_class_usage
label_desc: Use image node_id 2 for calling the TriTowerClassificationModel obj's underlying member method code with example usage: obj.torchscriptify(tensorizers, traced_model) and returns: ScriptPyTextTriTowerModuleWithDense