code: def setup_ort_session(model_pt_path, map_location):
      providers = (
          ["CUDAExecutionProvider", "CPUExecutionProvider"]
          if map_location == "cuda"
          else ["CPUExecutionProvider"]
      )
  
      sess_options = ort.SessionOptions()
      sess_options.intra_op_num_threads = psutil.cpu_count(logical=True)
  
      # Start an inference session
      ort_session = ort.InferenceSession(
          model_pt_path, providers=providers, sess_options=sess_options
      )
  
      return ort_session
  
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 1 for calling a global function with example usage: setup_ort_session(model_pt_path, map_location) and returns: ort_session