def METHOD_NAME(self, complete_card_map: map):
    curr_images_len = 0
    for element in self.entire_msg:
        if isinstance(element, MsTeamsImages):
            curr_images_len += element.get_images_len_in_bytes()
    max_len_left = self.MAX_SIZE_IN_BYTES - (self.__get_current_card_len(complete_card_map) - curr_images_len)
    curr_line = 0
    while True:
        line_added = False
        curr_line += 1
        for text_element, lines in self.text_file_containers:
            if len(lines) < curr_line:
                continue
            line = lines[len(lines) - curr_line]
            max_len_left -= len(line)
            if max_len_left < 0:
                return
            new_text_value = line + text_element.get_text_from_block()
            text_element.set_text_from_block(new_text_value)
            line_added = True
        if not line_added:
            return