def METHOD_NAME(blocks, block, plain_text_list, to_string, index):
    for item_index, item in enumerate(block["data"]["items"]):
        if not item:
            return
        new_text = clean_text_data(item)
        if to_string:
            plain_text_list.append(strip_tags(new_text))
        else:
            blocks[index]["data"]["items"][item_index] = new_text