class_docstr: TextClassifier handler class. This handler takes a text (string) and
  as input and returns the classification text based on the model vocabulary.
  Because the predefined TextHandler in ts/torch_handler defines unnecessary
  steps like loading a vocabulary file for the tokenizer, we define our handler
  starting from BaseHandler.
class_docstr_tok: ["TextClassifier","handler","class",".","This","handler","takes","a","text","(","string",")","and","as","input","and","returns","the","classification","text","based","on","the","model","vocabulary",".","Because","the","predefined","TextHandler","in","ts\/torch_handler","defines","unnecessary","steps","like","loading","a","vocabulary","file","for","the","tokenizer",",","we","define","our","handler","starting","from","BaseHandler","."]
docstr: Loads the PyTorch model and returns the NN model object.
  
  Args:
      model_pt_path (str): denotes the path of the model file.
  
  Returns:
      (NN Model Object) : Loads the model object.
docstr_tok: ["Loads","the","PyTorch","model","and","returns","the","NN","model","object",".","Args",":","model_pt_path","(","str",")",":","denotes","the","path","of","the","model","file",".","Returns",":","(","NN","Model","Object",")",":","Loads","the","model","object","."]
code: def _load_torchscript_model(self, model_pt_path):
      """Loads the PyTorch model and returns the NN model object.
  
      Args:
          model_pt_path (str): denotes the path of the model file.
  
      Returns:
          (NN Model Object) : Loads the model object.
      """
      # TODO: remove this method if https://github.com/pytorch/text/issues/1793 gets resolved
      model = torch.jit.load(model_pt_path)
      model.to(self.device)
      return model
  
file_path: serve/examples/text_classification_with_scriptable_tokenizer/handler.py
imports: import logging
  from abc import ABC
  import torch
  import torch.nn.functional
  import torchtext
  from ts.torch_handler.base_handler import BaseHandler
  from ts.utils.util import CLEANUP_REGEX, map_class_to_label
label_desc: Use image node_id 4 for calling the CustomTextClassifier obj's underlying member method code with example usage: obj._load_torchscript_model(model_pt_path) and returns: model