code: def test_002_train(self):
      if not torch.cuda.is_available():
          return
  
      params = {
          "model": "segmentation_spleen",
          "max_epochs": 1,
          "name": "net_test_02",
          "val_split": 0.5,
          "multi_gpu": False,
          "dataset": "CacheDataset",
      }
      response = self.client.post("/train/", json=params)
  
      assert response.status_code == 200
      assert response.json()
      time.sleep(5)
  
      assert (
          self.client.get("/train/?check_if_running=True").status_code
          == 200
      )
  
      while (
          self.client.get("/train/?check_if_running=True").status_code
          == 200
      ):
          time.sleep(5)
  
file_path: MONAILabel/tests/unit/endpoints/test_train.py
imports: import time
  import unittest
  import torch
  from .context import BasicBundleTestSuite, BasicDetectionBundleTestSuite, BasicEndpointV2TestSuite
label_desc: Use image node_id 2 for calling the TestEndPointTrain obj's underlying member method code with example usage: obj.test_002_train() without return types