class_docstr: Base default handler to load torchscript or eager mode [state_dict] models
  Also, provides handle method per torch serve custom model specification
class_docstr_tok: ["Base","default","handler","to","load","torchscript","or","eager","mode","[","state_dict","]","models","Also",",","provides","handle","method","per","torch","serve","custom","model","specification"]
docstr: Preprocess function to convert the request input to a tensor(Torchserve supported format).
  The user needs to override to customize the pre-processing
  
  Args :
      data (list): List of the data from the request input.
  
  Returns:
      tensor: Returns the tensor data of the input
docstr_tok: ["Preprocess","function","to","convert","the","request","input","to","a","tensor","(","Torchserve","supported","format",")",".","The","user","needs","to","override","to","customize","the","pre-processing","Args",":","data","(","list",")",":","List","of","the","data","from","the","request","input",".","Returns",":","tensor",":","Returns","the","tensor","data","of","the","input"]
code: def preprocess(self, data):
      """
      Preprocess function to convert the request input to a tensor(Torchserve supported format).
      The user needs to override to customize the pre-processing
  
      Args :
          data (list): List of the data from the request input.
  
      Returns:
          tensor: Returns the tensor data of the input
      """
  
      return torch.as_tensor(data, device=self.device)
  
imports: import abc
  import importlib.util
  import logging
  import os
  import time
  import torch
  from pkg_resources import packaging
  from ts.handler_utils.timer import timed
  from ..utils.util import check_valid_pt2_backend, list_classes_from_module, load_label_mapping
label_desc: Use image node_id 7 for calling the BaseHandler obj's underlying member method code with example usage: obj.preprocess(data) and returns: torch