Implement :pep:`673` :class:`typing.Self`. Patch by James Hilton-Balfe.