<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def from_mapping(self, mapping: Optional[Mapping[str, Any]]=None, **kwargs: Any) -> None: """Load the configuration values from a mapping. This allows either a mapping to be directly passed or as keyword arguments, for example, .. code-block:: python config = {'FOO': 'bar'} app.config.from_mapping(config) app.config.form_mapping(FOO='bar') Arguments: mapping: Optionally a mapping object. kwargs: Optionally a collection of keyword arguments to form a mapping. """

        mappings: Dict[str, Any] = {}
        if mapping is not None:
            mappings.update(mapping)
        mappings.update(kwargs)
        for key, value in mappings.items():
            if key.isupper():
                self[key] = value