code: def instance_segmentation():
      """Segment object instances in images."""
      cli = FlashCLI(
          InstanceSegmentation,
          InstanceSegmentationData,
          default_datamodule_builder=from_pets,
          default_arguments={
              "trainer.max_epochs": 3,
          },
      )
  
      cli.trainer.save_checkpoint("instance_segmentation_model.pt")
  
imports: from functools import partial
  from typing import Any, Callable, Dict, Optional
  from flash.core.utilities.flash_cli import FlashCLI
  from flash.core.utilities.imports import _ICEDATA_AVAILABLE, requires
  from flash.image import InstanceSegmentation, InstanceSegmentationData
label_desc: Use image node_id 2 for calling a global function with example usage: instance_segmentation() without return types