code: def parse_ents(doc, options={}):
      
      ents = [
          {"start": ent.start_char, "end": ent.end_char, "label": ent.label_}
          for ent in doc.ents
      ]
      if not ents:
          user_warning(Warnings.W006)
      title = doc.user_data.get("title", None) if hasattr(doc, "user_data") else None
      settings = get_doc_settings(doc)
      return {"text": doc.text, "ents": ents, "title": title, "settings": settings}
docs: Generate named entities in [{start: i, end: i, label: 'label'}] format.
  
      doc (Doc): Document do parse.
      RETURNS (dict): Generated entities keyed by text (original text) and ents.