code: def test_002_create_session(self):
      # global session_id, session_info
      files = [
          (
              "files",
              (
                  "spleen_3.nii.gz",
                  open(
                      os.path.join(self.studies, "spleen_3.nii.gz"),
                      "rb",
                  ),
              ),
          )
      ]
  
      response = self.client.put("/session/?expiry=600", files=files)
      assert response.status_code == 200
  
      r = response.json()
      session_id = r["session_id"]
      session_info = r["session_info"]
  
      assert session_id
      assert session_info
      assert os.path.isdir(
          os.path.join(settings.MONAI_LABEL_SESSION_PATH, session_id)
      )
  
      # def test_003_get_session(self):
      #     global session_id, session_info
      response = self.client.get(f"/session/{session_id}")
      assert response.status_code == 200
  
      # def test_004_update_session_ts(self):
      #     global session_id, session_info
      time.sleep(1)
      response = self.client.get(
          f"/session/{session_id}?update_ts=true"
      )
      assert response.status_code == 200
      assert (
          response.json()["last_access_ts"]
          > session_info["last_access_ts"]
      )
  
      # def test_005_get_session_image(self):
      response = self.client.get(f"/session/{session_id}?image=true")
      assert response.status_code == 200
      assert (
          response.headers["content-type"] == "application/octet-stream"
      )
  
      # def test_006_remove_session(self):
      #     global session_id, session_info
      response = self.client.delete(f"/session/{session_id}")
      assert response.status_code == 200
      assert not os.path.exists(
          os.path.join(settings.MONAI_LABEL_SESSION_PATH, session_id)
      )
  
file_path: MONAILabel/tests/unit/endpoints/test_session.py
imports: import os
  import time
  import unittest
  from monailabel.config import settings
  from .context import BasicEndpointTestSuite
label_desc: Use image node_id 2 for calling the EndPointSession obj's underlying member method code with example usage: obj.test_002_create_session() without return types