@make_certifier()<EOL>def certify_dict(<EOL>value, schema=None, allow_extra=False, required=True, key_certifier=None, value_certifier=None,<EOL>include_collections=False,<EOL>):
cls = dict<EOL>certify_params(<EOL>(certify_bool, '<STR_LIT>', allow_extra),<EOL>(certify_bool, '<STR_LIT>', include_collections),<EOL>)<EOL>if certify_required(<EOL>value=value,<EOL>required=required,<EOL>):<EOL><INDENT>return<EOL><DEDENT>types = [cls]<EOL>if include_collections:<EOL><INDENT>types.extend([Mapping, MutableMapping])<EOL><DEDENT>types = tuple(types)<EOL>if not isinstance(value, types):<EOL><INDENT>raise CertifierTypeError(<EOL>message="<STR_LIT>".format(<EOL>cls=cls,<EOL>t=value.__class__.__name__,<EOL>),<EOL>value=value,<EOL>required=required,<EOL>)<EOL><DEDENT>certify_dict_schema(<EOL>value=value,<EOL>schema=schema,<EOL>key_certifier=key_certifier,<EOL>value_certifier=value_certifier,<EOL>required=required,<EOL>allow_extra=allow_extra,<EOL>)<EOL>
Certifies a dictionary, checking it against an optional schema.

The schema should be a dictionary, with keys corresponding to the expected keys in `value`,
but with the values replaced by functions which will be called to with the corresponding
value in the input.

A simple example:

    >>> certifier = certify_dict(schema={
    ...    'id': certify_key(kind='Model'),
    ...    'count': certify_int(min=0),
    ...    })
    >>> certifier({'id': self.key, 'count': self.count})

:param dict|Mapping|MutableMapping value:
    The value to be certified.
:param dict schema:
    The schema against which the value should be checked.
:param bool allow_extra:
    Set to `True` to ignore extra keys.
:param bool required:
    Whether the value can't be `None`. Defaults to True.
:param callable key_certifier:
    callable that receives the key to certify (ignoring schema keys).
:param callable value_certifier:
    callable that receives the value to certify (ignoring schema values).
:param bool include_collections:
    Include types from collections.
:return:
    The certified dict.
:rtype:
    dict|Mapping|MutableMapping
:raises CertifierTypeError:
    The type is invalid
:raises CertifierValueError:
    The value is invalid