class_docstr: A :class:`.Output` which converts the model outputs to the label of the argmax classification per pixel in the
  image for semantic segmentation tasks.
  
  Args:
      labels_map: A dictionary that map the labels ids to pixel intensities.
      visualize: Whether to visualize the image labels.
code: def __init__(
      self,
      labels_map: Optional[Dict[int, Tuple[int, int, int]]] = None,
      visualize: bool = False,
  ):
      super().__init__()
      self.labels_map = labels_map
      self.visualize = visualize
  
imports: import random
  from typing import Any, Dict, Optional, Tuple, Union
  import numpy
  import torch
  from torch import Tensor
  import flash
  from flash.core.data.io.input import DataKeys
  from flash.core.data.io.output import Output
  from flash.core.registry import FlashRegistry
  from flash.core.utilities.imports import _FIFTYONE_AVAILABLE, _MATPLOTLIB_AVAILABLE, _TORCHVISION_AVAILABLE, lazy_import, requires
  from flash.core.utilities.providers import _FIFTYONE
label_desc: Use image node_id 1 to create a new SegmentationLabelsOutput object from inherited base classes: Output with example: obj = SegmentationLabelsOutput(labels_map, visualize)