def diamond_coord_test(x, y, z):  # dist2 = 3
    """Test for coordinate in diamond grid"""
    return (((x % 2 + y % 2 + z % 2) == 0 and (x//2+y//2+z//2) % 2 == 0) or
            ((x % 2 + y % 2 + z % 2) == 3 and (x//2+y//2+z//2) % 2 == 0))