code: def create_client(app_dir, studies, data_dir, conf=None):
      app_conf = {
          "heuristic_planner": "false",
          "server_mode": "true",
          "auto_update_scoring": "false",
          "debug": "true",
          "models": "deepedit",
          "tracking": True,
      }
      if conf:
          app_conf.update(conf)
  
      from monailabel.config import settings
  
      settings.MONAI_LABEL_APP_DIR = app_dir
      settings.MONAI_LABEL_STUDIES = studies
      settings.MONAI_LABEL_DATASTORE_AUTO_RELOAD = False
      settings.MONAI_LABEL_APP_CONF = app_conf
      settings.MONAI_LABEL_SESSION_PATH = os.path.join(
          data_dir, "sessions"
      )
      settings.MONAI_LABEL_TRACKING_ENABLED = app_conf["tracking"]
  
      for k, v in settings.dict().items():
          v = (
              json.dumps(v)
              if isinstance(v, list) or isinstance(v, dict)
              else str(v)
          )
          os.environ[k] = v
          logging.debug(f"{k} => {v}")
  
      logs_dir = os.path.join(app_dir, "logs")
      os.makedirs(logs_dir, exist_ok=True)
      open(os.path.join(logs_dir, "app.log"), "a").close()
  
      from monailabel.app import app
      from monailabel.interfaces.utils.app import clear_cache
  
      clear_cache()
      c = TestClient(app)
      time.sleep(1)
      return c
  
imports: import json
  import logging
  import os
  import random
  import time
  import unittest
  from fastapi.testclient import TestClient
  from monailabel.config import settings
label_desc: Use image node_id 1 for calling a global function with example usage: create_client(app_dir, studies, data_dir, conf) and returns: c