code: def save_into_ilp(self, project_name, labels, guidename):
      import h5py
      import wx
  
      with h5py.File(project_name) as f:
          g = f["DataSets"]
          for k in g:
              data_item = g[k]
              if data_item.attrs.get("fileName") == guidename:
                  break
          else:
              wx.MessageBox(
                  "Sorry, could not find the file, %s, in the project, %s"
                  % (guidename, project_name)
              )
          project_labels = data_item["labels"]["data"]
          mask = numpy.ones(
              project_labels.shape[2:4], project_labels.dtype
          )
          for label in labels:
              mask[label != 0] = 2
          #
          # "only" use the first 100,000 points in the image
          #
          subsample = 100000
          npts = numpy.prod(mask.shape)
          if npts > subsample:
              r = numpy.random.RandomState()
              r.seed(numpy.sum(mask) % (2**16))
              i, j = numpy.mgrid[0 : mask.shape[0], 0 : mask.shape[1]]
              i0 = i[mask == 1]
              j0 = j[mask == 1]
              i1 = i[mask == 2]
              j1 = j[mask == 2]
              if len(i1) < subsample / 2:
                  p0 = r.permutation(len(i0))[: (subsample - len(i1))]
                  p1 = numpy.arange(len(i1))
              elif len(i0) < subsample / 2:
                  p0 = numpy.arange(len(i0))
                  p1 = r.permutation(len(i1))[: (subsample - len(i0))]
              else:
                  p0 = r.permutation(len(i0))[: (subsample / 2)]
                  p1 = r.permutation(len(i1))[: (subsample / 2)]
              mask_copy = numpy.zeros(mask.shape, mask.dtype)
              mask_copy[i0[p0], j0[p0]] = 1
              mask_copy[i1[p1], j1[p1]] = 2
              if "prediction" in data_item:
                  prediction = data_item["prediction"]
                  if numpy.max(prediction[0, 0, :, :, 0]) > 0.5:
                      # Only do if prediction was done (otherwise all == 0)
                      for n in range(2):
                          p = prediction[0, 0, :, :, n]
                          bad = (p < 0.5) & (mask == n + 1)
                          mask_copy[i[bad], j[bad]] = n + 1
              mask = mask_copy
          project_labels[0, 0, :, :, 0] = mask
  
imports: from cellprofiler_core.constants.measurement import COLTYPE_INTEGER
  from cellprofiler_core.constants.measurement import FF_CHILDREN_COUNT
  from cellprofiler_core.constants.measurement import FF_PARENT
  from cellprofiler_core.image import ObjectsImage
  from cellprofiler_core.module import Identify
  from cellprofiler_core.setting.choice import Choice
  from cellprofiler_core.setting.subscriber import ImageSubscriber
  from cellprofiler_core.setting.subscriber import LabelSubscriber
  from cellprofiler_core.setting.text import LabelName
  from cellprofiler_core.utilities.core.module.identify import add_object_count_measurements
  from cellprofiler_core.utilities.core.module.identify import add_object_location_measurements_ijv
  from cellprofiler_core.utilities.core.module.identify import get_object_measurement_columns
  from cellprofiler.modules import _help
  import os
  import numpy
  from cellprofiler_core.object import Objects
  from cellprofiler_core.setting import Binary
  from cellprofiler_core.utilities.pathname import pathname2url
label_desc: Use image node_id 7 for calling the EditObjectsManually obj's underlying member method code with example usage: obj.save_into_ilp(project_name, labels, guidename) without return types