def are_neighbours(pixel1,pixel2):
    """
    Return True if if each of the x/y coords of pixel1 and pixel2 differ by two
    or less, ie. each pixel not at the edge has 9 neighbours (including
    itself).
    """
    x1, y1 = pixel1
    x2, y2 = pixel2
    return abs(x2 - x1) <= 1 and abs (y2 - y1) <= 1