def METHOD_NAME(self, eid=None, etype=None):
    self._load_coref()
    if not eid:
        counter = 1
        while self._eid_to_entity.get(f'c{counter}'):
            counter += 1
        eid = f'c{counter}'
    elif self._eid_to_entity.get(eid):
        raise ValueError("Entity with eid=%s already exists", eid)
    entity = udapi.core.coref.CorefEntity(eid, etype)
    self._eid_to_entity[eid] = entity
    return entity