def METHOD_NAME(self) -> DocParagraph:
    doc = self.doc
    if self.editing_area:
        context_par = doc.get_previous_par_by_id(self.area_start)
    elif not self.is_adding:
        context_par = doc.get_previous_par_by_id(self.par)
        if context_par is None:
            return self.get_last_of_preamble()
    elif self.next_par_id:
        context_par = doc.get_previous_par_by_id(self.next_par_id)
        if context_par is None:
            return self.get_last_of_preamble()
    else:
        context_par = doc.get_last_par()
    return context_par