code: def totensor(self):
      return object_prediction_list_to_torch(self)
  
imports: from collections.abc import Sequence
  from typing import List, Union
  import numpy
  import torch
  from sahi.annotation import BoundingBox, Category, Mask
  from sahi.prediction import ObjectPrediction
label_desc: Use image node_id 7 for calling the ObjectPredictionList obj's underlying member method code with example usage: obj.totensor() and returns: object_prediction_list_to_torch