class_docstr: The torchserve side inference and explain end-points requests are handled to
  return a KServe side response
  
  Args:
      kserve.KFModel(class object): The predict and explain methods are overridden by torchserve
      side predict and explain http requests.
docstr: This method validates model availabilty in the model directory
  and sets ready flag to true.
docstr_tok: ["This","method","validates","model","availabilty","in","the","model","directory","and","sets","ready","flag","to","true","."]
code: def load(self) -> bool:
      """This method validates model availabilty in the model directory
      and sets ready flag to true.
      """
      model_path = pathlib.Path(Storage.download(self.model_dir))
      paths = list(pathlib.Path(model_path).glob("*"))
      existing_paths = [
          path
          for path in paths
          if path.is_dir() or path.suffixes == [".mar"]
      ]
      if len(existing_paths) == 0:
          raise ModelMissingError(model_path)
      self.ready = True
      return self.ready
  
imports: import logging
  import pathlib
  from enum import Enum
  from typing import Dict, Union
  import grpc
  import inference_pb2_grpc
  import kserve
  from gprc_utils import from_ts_grpc, to_ts_grpc
  from inference_pb2 import PredictionResponse
  from kserve.errors import ModelMissingError
  from kserve.model import Model
  from kserve.protocol.grpc.grpc_predict_v2_pb2 import ModelInferRequest, ModelInferResponse
  from kserve.protocol.infer_type import InferRequest, InferResponse
  from kserve.storage import Storage
label_desc: Use image node_id 4 for calling the TorchserveModel obj's underlying member method code with example usage: obj.load() and returns: self