code: def main():
      from pathlib import Path
  
      from monailabel.config import settings
  
      settings.MONAI_LABEL_DATASTORE_AUTO_RELOAD = False
      settings.MONAI_LABEL_DATASTORE_READ_ONLY = False
      settings.MONAI_LABEL_DATASTORE_FILE_EXT = [
          "*.svs",
          "*.png",
          "*.npy",
          "*.tif",
          ".xml",
      ]
      os.putenv("MASTER_ADDR", "127.0.0.1")
      os.putenv("MASTER_PORT", "1234")
  
      logging.basicConfig(
          level=logging.INFO,
          format="[%(asctime)s] [%(process)s] [%(threadName)s] [%(levelname)s] (%(name)s:%(lineno)d) - %(message)s",
          datefmt="%Y-%m-%d %H:%M:%S",
          force=True,
      )
  
      home = str(Path.home())
      studies = f"{home}/Dataset/Pathology/dummy"
  
      app_dir = os.path.dirname(__file__)
      app = MyApp(
          app_dir,
          studies,
          {
              "preload": "true",
              "models": "hovernet_nuclei",
              "use_pretrained_model": "false",
              "consep": "true",
          },
      )
  
      # train_from_dataset(app, "nuclick", "Nuclei")
      # infer(app, "hovernet_nuclei")
      train(app, "hovernet_nuclei")
  
imports: import ctypes.util
  import logging
  import os
  import platform
  from ctypes import cdll
  from typing import Dict
  import lib.configs
  from lib.activelearning.random import WSIRandom
  from lib.infers import NuClick
  import monailabel
  from monailabel.datastore.dsa import DSADatastore
  from monailabel.interfaces.app import MONAILabelApp
  from monailabel.interfaces.config import TaskConfig
  from monailabel.interfaces.datastore import Datastore
  from monailabel.interfaces.tasks.infer_v2 import InferTask
  from monailabel.interfaces.tasks.strategy import Strategy
  from monailabel.interfaces.tasks.train import TrainTask
  from monailabel.tasks.infer.basic_infer import BasicInferTask
  from monailabel.utils.others.class_utils import get_class_names
  from monailabel.utils.others.generic import strtobool
label_desc: Use image node_id 1 for calling a global function with example usage: main() without return types