code: def combine_arrays(self, labels_x, labels_y):
      output = numpy.zeros_like(labels_x)
      method = self.merge_method.value
  
      # Ensure labels in each set are unique
      labels_y[labels_y > 0] += labels_x.max()
  
      if method == "Preserve":
          return numpy.where(labels_x > 0, labels_x, labels_y)
  
      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
  
      is_2d = labels_x.ndim == 2
  
      # Resolve conflicting labels
      if method == "Discard":
          return numpy.where(labels_x > 0, labels_x, output)
  
      elif method == "Segment":
          to_segment = numpy.logical_or(labels_x > 0, labels_y > 0)
          disputed = numpy.logical_and(labels_x > 0, labels_y > 0)
          seeds = numpy.add(labels_x, labels_y)
          # Find objects which will be completely removed due to 100% overlap.
          will_be_lost = numpy.setdiff1d(
              labels_x[disputed], labels_x[~disputed]
          )
          # Check whether this was because an identical object is in both arrays.
          for label in will_be_lost:
              x_mask = labels_x == label
              y_lab = numpy.unique(labels_y[x_mask])
              if not y_lab or len(y_lab) > 1:
                  # Labels are not identical
                  continue
              else:
                  # Get mask of object on y, check if identical to x
                  y_mask = labels_y == y_lab[0]
                  if numpy.array_equal(x_mask, y_mask):
                      # Label is identical
                      output[x_mask] = label
                      to_segment[x_mask] = False
          seeds[disputed] = 0
          if is_2d:
              distances, (i, j) = scipy.ndimage.distance_transform_edt(
                  seeds == 0, return_indices=True
              )
              output[to_segment] = seeds[i[to_segment], j[to_segment]]
          else:
              distances, (
                  i,
                  j,
                  v,
              ) = scipy.ndimage.distance_transform_edt(
                  seeds == 0, return_indices=True
              )
              output[to_segment] = seeds[
                  i[to_segment], j[to_segment], v[to_segment]
              ]
  
      elif method == "Merge":
          to_segment = numpy.logical_or(labels_x > 0, labels_y > 0)
          if is_2d:
              distances, (i, j) = scipy.ndimage.distance_transform_edt(
                  labels_x == 0, return_indices=True
              )
              output[to_segment] = labels_x[
                  i[to_segment], j[to_segment]
              ]
          else:
              distances, (
                  i,
                  j,
                  v,
              ) = scipy.ndimage.distance_transform_edt(
                  labels_x == 0, return_indices=True
              )
              output[to_segment] = labels_x[
                  i[to_segment], j[to_segment], v[to_segment]
              ]
  
      return output
  
imports: import numpy
  import scipy.ndimage
  import skimage.morphology
  import skimage.segmentation
  from cellprofiler_core.module import Identify
  from cellprofiler_core.object import Objects
  from cellprofiler_core.setting.choice import Choice
  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 get_object_measurement_columns
  from cellprofiler_core.utilities.core.module.identify import add_object_location_measurements
  from cellprofiler_library.modules import combineobjects
label_desc: Use image node_id 6 for calling the CombineObjects obj's underlying member method code with example usage: obj.combine_arrays(labels_x, labels_y) and returns: output, numpy, numpy