<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_columns_fit(unoccupied_columns, row, offset, row_length):
 """ Checks if all the occupied columns in the row fit in the indices given by free columns. True True False True False """

    for index, item in row:
        adjusted_index = (index + offset) % row_length

        # Check if the index is in the appropriate place.
        if adjusted_index not in unoccupied_columns:
            return False

    return True