code: def read_json_entities(filename):
      """
      Read entities from a file, return a list of (text, label)
  
      Should work on both BIOES and BIO
      """
      with open(filename) as fin:
          doc = Document(json.load(fin))
  
          return list_doc_entities(doc)
  
imports: from collections import defaultdict
  import json
  import os
  import random
  from stanza.models.common.doc import Document
  import stanza.utils.datasets.ner.prepare_ner_file
label_desc: Use image node_id 13 for calling a global function with example usage: read_json_entities(filename) and returns: list_doc_entities