code: def _unpack_segs_to_masks(segs):
      masks = []
      for seg in segs:
          for l in range(seg.min(), seg.max() + 1):
              masks.append(seg == l)
      return masks
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import logging
  from .base import CoreSaliency
  from .integrated_gradients import IntegratedGradients
  import numpy
  from skimage import segmentation
  from skimage.morphology import dilation
  from skimage.morphology import disk
  from skimage.transform import resize
label_desc: Use image node_id 7 for calling a global function with example usage: _unpack_segs_to_masks(segs) and returns: masks