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

        if not importSection:
            return


        raw_bytes = (c_ubyte * dataDirectoryEntry.Size).from_buffer(importSection.raw, to_offset(dataDirectoryEntry.VirtualAddress, importSection))
        offset = 0
        import_descriptors = []
        while True:
            import_descriptor = IMAGE_IMPORT_DESCRIPTOR.from_buffer(raw_bytes, offset)


            if import_descriptor.OriginalFirstThunk == 0:
                break
            else:
                nameOffset = to_offset(import_descriptor.Name, importSection)

                checkOffset(nameOffset, importSection)
                dllName = get_str(importSection.raw, nameOffset)

                import_name_table =  self.__parseThunks(import_descriptor.OriginalFirstThunk, importSection)
                import_address_table =  self.__parseThunks(import_descriptor.FirstThunk, importSection)

                import_descriptors.append(ImportDescriptorData(header=import_descriptor, dllName=dllName, importNameTable=import_name_table, importAddressTable=import_address_table))
            offset += sizeof(IMAGE_IMPORT_DESCRIPTOR)
        return import_descriptors