How can I get the Draft and sharedDraft of a Page?

Does someone know how I can get the draft & sharedDraft (if one exists and CE enabled) for a certain page?
I need to check if my macro still exists in the draft.

Use to get draft or sharedDraft (works for Collaborative Editing (CE) on and off):

ContentEntityObject draft = draftsTransitionHelper.getDraftForPage(page)

CE on: if draft exists returns draft, else returns last published page version of the page
CE off: if draft exists returns draft, else returns null