    def is_type(self, instance, type: str) -> bool:
        """
        Check if the instance is of the appropriate type.

        Arguments:

            instance:

                The instance to check

            type:

                The name of the type that is expected.

        Raises:

            `jsonschema.exceptions.UndefinedTypeCheck`:

                if ``type`` is unknown to this object.

        """
        try:
            fn = self._type_checkers[type]
        except KeyError:
            raise UndefinedTypeCheck(type) from None

        return fn(self, instance)
Check if the instance is of the appropriate type.

Arguments:

instance:

The instance to check

type:

The name of the type that is expected.

Raises:

`jsonschema.exceptions.UndefinedTypeCheck`:

if ``type`` is unknown to this object.
jsonschema/_types.py