def offsets_to_cell_num(y_offset, x_offset):
    """
    :param y_offset: The y_offset inside a block. Precondition: 0 <= y_offset < 3
    :param x_offset: The x_offset inside a block. Precondition: 0 <= x_offset < 3
    :return: The cell number inside a block
    """
    return 3 * y_offset + x_offset