code: def MaskBlock(
      codes: list = None,  # Vocab labels for segmentation masks
  ):
      "A `TransformBlock` for segmentation masks, potentially with `codes`"
      return TransformBlock(
          type_tfms=PILMask.create,
          item_tfms=AddMaskCodes(codes=codes),
          batch_tfms=IntToFloatTensor,
      )
  
imports: from __future__ import annotations
  from ..torch_basics import *
  from ..data.all import *
  from .core import *
  import types
label_desc: Use image node_id 7 for calling a global function with example usage: MaskBlock(codes) and returns: TransformBlock