code: def infer(self) -> Union[InferTask, Dict[str, InferTask]]:
      task: InferTask = lib.infers.Segmentation(
          path=self.path,
          network=self.network,
          roi_size=self.roi_size,
          target_spacing=self.target_spacing,
          labels=self.labels,
          preload=strtobool(self.conf.get("preload", "false")),
          config={
              "largest_cc": True if has_cp and has_cucim else False
          },
      )
      return task
  
file_path: MONAILabel/sample-apps/radiology/lib/configs/segmentation.py
imports: import logging
  import os
  from typing import Any, Dict, Optional, Union
  import lib.infers
  import lib.trainers
  from monai.networks.nets import SegResNet
  from monai.utils import optional_import
  from monailabel.interfaces.config import TaskConfig
  from monailabel.interfaces.tasks.infer_v2 import InferTask
  from monailabel.interfaces.tasks.train import TrainTask
  from monailabel.utils.others.generic import download_file, strtobool
label_desc: Use image node_id 2 for calling the Segmentation obj's underlying member method code with example usage: obj.infer() and returns: task