code: def read_paragraphs(section):
      for doc in section:
          part_id = None
          paragraph = []
          for sentence in doc["sentences"]:
              if part_id is None:
                  part_id = sentence["part_id"]
              elif part_id != sentence["part_id"]:
                  yield doc["document_id"], part_id, paragraph
                  paragraph = []
                  part_id = sentence["part_id"]
              paragraph.append(sentence)
          if paragraph != []:
              yield doc["document_id"], part_id, paragraph
  
file_path: stanza/stanza/utils/datasets/coref/convert_ontonotes.py
imports: from collections import defaultdict
  from functools import lru_cache
  import json
  import os
  import stanza
  from stanza.models.constituency import tree_reader
  from stanza.utils.default_paths import get_default_paths
  from stanza.utils.get_tqdm import get_tqdm
label_desc: Use image node_id 2 for calling a global function with example usage: read_paragraphs(section) without return types