def validate(cls, instance):
        """Validate a JSON representation of component metadata against :attr:`schema`.

        This method does not validate annotations of the interface members, and consequently does
        not make network requests.

        Arguments
        ---------
        instance : :class:`dict`
            JSON representation to validate, either previously returned by :meth:`as_json` or
            retrieved from an external source.

        Raises
        ------
        :exc:`InvalidMetadata`
            If :py:`instance` doesn't conform to :attr:`schema`.
        """
        try:
            super(cls, cls).validate(instance)
        except InvalidAnnotation as e:
            raise InvalidMetadata(e) from e
Validate a JSON representation of component metadata against :attr:`schema`.

        This method does not validate annotations of the interface members, and consequently does
        not make network requests.

        Arguments
        ---------
        instance : :class:`dict`
            JSON representation to validate, either previously returned by :meth:`as_json` or
            retrieved from an external source.

        Raises
        ------
        :exc:`InvalidMetadata`
            If :py:`instance` doesn't conform to :attr:`schema`.
        
amaranth/lib/wiring.py