def __init_subclass__(cls, **kwargs):
        """
        Defining a subclass of :class:`Annotation` causes its :data:`schema` to be validated.

        Raises
        ------
        :exc:`InvalidSchema`
            If :data:`schema` doesn't conform to the `2020-12` draft of `JSON Schema`_.
        :exc:`InvalidSchema`
            If :data:`schema` doesn't have a  `"$id" keyword`_ at its root. This requirement is
            specific to :class:`Annotation` schemas.
        """
        super().__init_subclass__(**kwargs)

        if not isinstance(cls.schema, dict):
            raise TypeError(f"Annotation schema must be a dict, not {cls.schema!r}")

        if "$id" not in cls.schema:
            raise InvalidSchema(f"'$id' keyword is missing from Annotation schema: {cls.schema}")

        try:
            # TODO: Remove this. Ignore a deprecation warning from jschon's rfc3986 dependency.
            with warnings.catch_warnings():
                warnings.filterwarnings("ignore", category=DeprecationWarning)
                result = cls.__jschon_schema().validate()
        except jschon.JSONSchemaError as e:
            raise InvalidSchema(e) from e

        if not result.valid:
            raise InvalidSchema("Invalid Annotation schema:\n" +
                                pprint.pformat(result.output("basic")["errors"],
                                               sort_dicts=False))

        Defining a subclass of :class:`Annotation` causes its :data:`schema` to be validated.

        Raises
        ------
        :exc:`InvalidSchema`
            If :data:`schema` doesn't conform to the `2020-12` draft of `JSON Schema`_.
        :exc:`InvalidSchema`
            If :data:`schema` doesn't have a  `"$id" keyword`_ at its root. This requirement is
            specific to :class:`Annotation` schemas.
        
amaranth/lib/meta.py