@classmethod
def KeyError(cls, out_type, name='dictionary'):
    """
        Create an instance of this class suitable for handling
        occurrences of :py:exc:`KeyError` caused by, e.g. dictionary
        access via :py:meth:`~object.__getitem__`.

        :py:attr:`in_type` is implicitly :py:exc:`KeyError` and `name`
        is the name of the dictionary where the error occurred.
        """
    return cls(KeyError, out_type, "Missing '{str}' from {name}", name=name)
