def METHOD_NAME(self, treemodel, iter0, iter1, column):
    pix0 = treemodel.get_value(iter0, column)
    pix1 = treemodel.get_value(iter1, column)
    if isinstance(pix0, GdkPixbuf.Pixbuf) and isinstance(pix1, GdkPixbuf.Pixbuf):
        return cmp(pix0.get_pixels(), pix1.get_pixels())
    return cmp(pix0, pix1)