              if key in ("token_annotation", "doc_annotation"):
                  pass
              elif key == "ids":
                  pass
              elif key in ("cats", "links"):
                  doc_dict[key] = value
              elif key in ("ner", "entities"):
                  doc_dict["entities"] = value
              else:
                  token_dict[key] = value
 
</s> remove             elif key == "cats":
                pass
 </s> add  </s> remove             if key == "entities":
 </s> add             if key in ["entities", "cats", "spans"]: </s> remove             "you're setting don't overlap.")
 </s> add             "you're setting don't overlap. To work with overlapping entities, "
            "consider using doc.spans instead.")
            elif key in ("cats", "links", "spans"):
              if key in ("token_annotation", "doc_annotation"):
                  pass
              elif key == "ids":
                  pass
            elif key in ("cats", "links", "spans"):
                  doc_dict[key] = value
              elif key in ("ner", "entities"):
                  doc_dict["entities"] = value
              else:
                  token_dict[key] = value
keep keep keep keep replace keep keep keep keep keep
 Support doc.spans in Example.from_dict (#7197)

* add support for spans in Example.from_dict

* add unit tests

* update error to E879 
spacy/training/example.pyx