docs: def create_coreference(self, coref_type, term_ids, id=None):
          """
          Create a new coreference object and add it to the coreferences layer
          @type coref_type: string
          @param coref_type: type of the coreference object
          @type term_ids: list
          @param term_ids: list of term ids
          @type id: string
          @param id: optional id of the entity
          """
          if id is None:
              if self.coreference_layer is None:
                  i = 1
              else:
                  corefs = (l for l in self.coreference_layer.get_corefs() if l.get_type == coref_type)
                  i = len(list(corefs)) + 1
              id = "co{coref_type}{i}".format(**locals())
  
          new_coref = Ccoreference(type=self.type)
          new_coref.set_id(id)
          new_coref.set_type(coref_type)
          new_coref.add_span(term_ids)
          self.add_coreference(new_coref)
          return new_coref