Return the `w:comment` element identified by `comment_id`, or |None| if not found.
(self, comment_id: int)
| 61 | return comment |
| 62 | |
| 63 | def get_comment_by_id(self, comment_id: int) -> CT_Comment | None: |
| 64 | """Return the `w:comment` element identified by `comment_id`, or |None| if not found.""" |
| 65 | comment_elms = self.xpath(f"(./w:comment[@w:id='{comment_id}'])[1]") |
| 66 | return comment_elms[0] if comment_elms else None |
| 67 | |
| 68 | def _next_available_comment_id(self) -> int: |
| 69 | """The next available comment id. |