Deduplicate annotation extraction (#912)

* Deduplicate annotation extraction

* slots baby

* Add docstrings

* Ensure empty pipe returns same object
4 files changed