code: def discard_objects(labels_x, labels_y):
      """
      Discard objects that overlap with objects in the initial set
      """
      output = numpy.zeros_like(labels_x)
      indices_x = numpy.unique(labels_x)
      indices_x = indices_x[indices_x > 0]
      indices_y = numpy.unique(labels_y)
      indices_y = indices_y[indices_y > 0]
      # Resolve non-conflicting labels first
      undisputed = numpy.logical_xor(labels_x > 0, labels_y > 0)
      undisputed_x = numpy.setdiff1d(indices_x, labels_x[~undisputed])
      mask = numpy.isin(labels_x, undisputed_x)
      output = numpy.where(mask, labels_x, output)
      labels_x[mask] = 0
      undisputed_y = numpy.setdiff1d(indices_y, labels_y[~undisputed])
      mask = numpy.isin(labels_y, undisputed_y)
      output = numpy.where(mask, labels_y, output)
      labels_y[mask] = 0
  
      return numpy.where(labels_x > 0, labels_x, output)
  
imports: from typing import Literal
  import centrosome.cpmorphology
  import numpy
  import scipy.ndimage
  import skimage.morphology
  import mahotas
label_desc: Use image node_id 11 for calling a global function with example usage: discard_objects(labels_x, labels_y) and returns: numpy