<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def __parseThunks(self, thunkRVA, importSection):
 """Parses the thunks and returns a list"""

        offset = to_offset(thunkRVA, importSection)
        table_offset = 0
        thunks = []
        while True:
            thunk = IMAGE_THUNK_DATA.from_buffer(importSection.raw, offset)
            offset += sizeof(IMAGE_THUNK_DATA)
            if thunk.Ordinal == 0:
                break
            thunkData = ThunkData(header=thunk, rva=table_offset+thunkRVA,ordinal=None, importByName=None)
            if to_offset(thunk.AddressOfData, importSection) > 0 and to_offset(thunk.AddressOfData, importSection) < len(self._bytes):
                self.__parseThunkData(thunkData, importSection)
            thunks.append(thunkData)
            table_offset += 4
        return thunks