docs: 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.
  
      >>> check_columns_fit({0,1,2,3}, [(0, True), (2, True)], 0, 4)
      True
      >>> check_columns_fit({0,2,3}, [(2, True), (3, True)], 0, 4)
      True
      >>> check_columns_fit({}, [(2, True), (3, True)], 0, 4)
      False
      >>> check_columns_fit({0}, [(2, True)], 2, 4)
      True
      >>> check_columns_fit({0}, [(3, True)], 2, 4)
      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