docstr: uploads Assessments to xnat using xapi
  :param aiaa_model_name: model name used to generate this file
  :param image_id: image id to use
  :param file_path: file to upload
  :param type: "SEG" for dicom seg or "MEAS" for measurments
docstr_tok: ["uploads","Assessments","to","xnat","using","xapi",":","param","aiaa_model_name",":","model","name","used","to","generate","this","file",":","param","image_id",":","image","id","to","use",":","param","file_path",":","file","to","upload",":","param","type",":","``","SEG","''","for","dicom","seg","or","``","MEAS","''","for","measurments"]
code: def __upload_assessment(
      self, aiaa_model_name, image_id, file_path, type
  ):
      """
      uploads Assessments to xnat using xapi
      :param aiaa_model_name: model name used to generate this file
      :param image_id: image id to use
      :param file_path: file to upload
      :param type: "SEG" for dicom seg or "MEAS" for measurments
      """
      if not os.path.exists(file_path):
          logging.error(f" file {file_path} does not exist! ")
          return
      data = open(file_path, "rb")
      project, subject, experiment, scan = self._id_to_fields(image_id)
      url = "{}/xapi/roi/projects/{}/sessions/{}/collections/Pat{}_S{}_{}".format(
          self.api_url,
          quote_plus(project),
          quote_plus(experiment),
          quote_plus(subject),
          quote_plus(scan),
          quote_plus(aiaa_model_name),
      )
  
      self._request_put(url, data, type=type)
  
imports: import io
  import logging
  import os
  import pathlib
  import shutil
  import time
  from typing import Any, Dict, List, Optional
  from urllib.parse import quote_plus
  from xml.etree import ElementTree
  import requests
  from requests.auth import HTTPBasicAuth
  from monailabel.datastore.utils.convert import nifti_to_dicom_seg
  from monailabel.interfaces.datastore import Datastore
  from monailabel.utils.others.generic import md5_digest
label_desc: Use image node_id 38 for calling the XNATDatastore obj's underlying member method code with example usage: obj.__upload_assessment(aiaa_model_name, image_id, file_path, type) without return types