def extend(validator, validators=(), version=None, type_checker=None):
all_validators = dict(validator.VALIDATORS)<EOL>all_validators.update(validators)<EOL>if type_checker is None:<EOL><INDENT>type_checker = validator.TYPE_CHECKER<EOL><DEDENT>elif validator._CREATED_WITH_DEFAULT_TYPES:<EOL><INDENT>raise TypeError(<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>return create(<EOL>meta_schema=validator.META_SCHEMA,<EOL>validators=all_validators,<EOL>version=version,<EOL>type_checker=type_checker,<EOL>id_of=validator.ID_OF,<EOL>)<EOL>
Create a new validator class by extending an existing one.

Arguments:

    validator (jsonschema.IValidator):

        an existing validator class

    validators (collections.Mapping):

        a mapping of new validator callables to extend with, whose
        structure is as in `create`.

        .. note::

            Any validator callables with the same name as an existing one
            will (silently) replace the old validator callable entirely,
            effectively overriding any validation done in the "parent"
            validator class.

            If you wish to instead extend the behavior of a parent's
            validator callable, delegate and call it directly in the new
            validator function by retrieving it using
            ``OldValidator.VALIDATORS["validator_name"]``.

    version (str):

        a version for the new validator class

    type_checker (jsonschema.TypeChecker):

        a type checker, used when applying the :validator:`type` validator.

        If unprovided, the type checker of the extended
        `jsonschema.IValidator` will be carried along.`

Returns:

    a new `jsonschema.IValidator` class extending the one provided

.. note:: Meta Schemas

    The new validator class will have its parent's meta schema.

    If you wish to change or extend the meta schema in the new
    validator class, modify ``META_SCHEMA`` directly on the returned
    class. Note that no implicit copying is done, so a copy should
    likely be made before modifying it, in order to not affect the
    old validator.