def METHOD_NAME(image):
    data = image.pixel_data
    if image.multichannel:
        data = skimage.color.rgb2gray(data)
    binary = data > skimage.filters.threshold_li(data)
    labels = skimage.measure.label(binary)
    objects = cellprofiler_core.object.Objects()
    objects.segmented = labels
    objects.parent_image = image
    return objects