code: def get_labels_mask(labelset, shape):
      labels_mask = np.zeros(shape, bool)
      for labels, indexes in labelset:
          labels_mask = labels_mask | labels > 0
      return labels_mask
  
imports: import numpy
  import scipy
  import centrosome
  import centrosome.cpmorphology
  import centrosome.filter
  import centrosome.propagate
  import centrosome.fastemd
  from sklearn.cluster import KMeans
  from cellprofiler_library.opts import measureimageoverlap
  from cellprofiler_library.functions.segmentation import convert_labels_to_ijv
  from cellprofiler_library.functions.segmentation import indices_from_ijv
  from cellprofiler_library.functions.segmentation import count_from_ijv
  from cellprofiler_library.functions.segmentation import areas_from_ijv
  from cellprofiler_library.functions.segmentation import cast_labels_to_label_set
label_desc: Use image node_id 4 for calling a global function with example usage: get_labels_mask(labelset, shape) and returns: labels_mask