code: def __init__(self, app_dir, studies, conf):
      self.model_dir = os.path.join(app_dir, "model")
  
      configs = {}
      for c in get_class_names(lib.configs, "TaskConfig"):
          name = c.split(".")[-2].lower()
          configs[name] = c
  
      configs = {k: v for k, v in sorted(configs.items())}
  
      # Load models from app model implementation, e.g., --conf models <segmentation_spleen>
      models = conf.get("models")
      if not models:
          print("")
          print(
              "---------------------------------------------------------------------------------------"
          )
          print("Provide --conf models <name>")
          print(
              "Following are the available models.  You can pass comma (,) seperated names to pass multiple"
          )
          print(f"    all, {', '.join(configs.keys())}")
          print(
              "---------------------------------------------------------------------------------------"
          )
          print("")
          exit(-1)
  
      models = models.split(",")
      models = [m.strip() for m in models]
      # Can be configured with --conf scribbles false or true
      self.scribbles = conf.get("scribbles", "true") == "true"
      invalid = [m for m in models if m != "all" and not configs.get(m)]
      if invalid:
          print("")
          print(
              "---------------------------------------------------------------------------------------"
          )
          print(f"Invalid Model(s) are provided: {invalid}")
          print(
              "Following are the available models.  You can pass comma (,) seperated names to pass multiple"
          )
          print(f"    all, {', '.join(configs.keys())}")
          print(
              "---------------------------------------------------------------------------------------"
          )
          print("")
          exit(-1)
  
      # Use Heuristic Planner to determine target spacing and spatial size based on dataset+gpu
      spatial_size = json.loads(
          conf.get("spatial_size", "[48, 48, 32]")
      )
      target_spacing = json.loads(
          conf.get("target_spacing", "[1.0, 1.0, 1.0]")
      )
      self.heuristic_planner = strtobool(
          conf.get("heuristic_planner", "false")
      )
      self.planner = HeuristicPlanner(
          spatial_size=spatial_size, target_spacing=target_spacing
      )
  
      # app models
      self.models: Dict[str, TaskConfig] = {}
      for n in models:
          for k, v in configs.items():
              if self.models.get(k):
                  continue
              if n == k or n == "all":
                  logger.info(f"+++ Adding Model: {k} => {v}")
                  self.models[k] = eval(f"{v}()")
                  self.models[k].init(
                      k, self.model_dir, conf, self.planner
                  )
      logger.info(f"+++ Using Models: {list(self.models.keys())}")
  
      # Load models from bundle config files, local or released in Model-Zoo, e.g., --conf bundles <spleen_ct_segmentation>
      self.bundles = (
          get_bundle_models(app_dir, conf, conf_key="bundles")
          if conf.get("bundles")
          else None
      )
  
      super().__init__(
          app_dir=app_dir,
          studies=studies,
          conf=conf,
          name=f"MONAILabel - Radiology ({monailabel.__version__})",
          description="DeepLearning models for radiology",
          version=monailabel.__version__,
      )
  
imports: import json
  import logging
  import os
  from typing import Dict
  import lib.configs
  from lib.activelearning import Last
  from lib.infers.deepgrow_pipeline import InferDeepgrowPipeline
  from lib.infers.vertebra_pipeline import InferVertebraPipeline
  import monailabel
  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.scoring import ScoringMethod
  from monailabel.interfaces.tasks.strategy import Strategy
  from monailabel.interfaces.tasks.train import TrainTask
  from monailabel.scribbles.infer import GMMBasedGraphCut, HistogramBasedGraphCut
  from monailabel.tasks.activelearning.first import First
  from monailabel.tasks.activelearning.random import Random
  from monailabel.tasks.infer.bundle import BundleInferTask
  from monailabel.tasks.train.bundle import BundleTrainTask
  from monailabel.utils.others.class_utils import get_class_names
  from monailabel.utils.others.generic import get_bundle_models, strtobool
  from monailabel.utils.others.planner import HeuristicPlanner
label_desc: Use image node_id 1 to create a new MyApp object from inherited base classes: MONAILabelApp with example: obj = MyApp(app_dir, studies, conf)