<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def clear_context(self, app=None):
 """Clear the component's context. Keyword Args: app (flask.Flask, optional):
 The app to clear this component's context for. If omitted, the value from ``Component.app`` is used. """

        if (app is None and self._context is _CONTEXT_MISSING
                and not in_app_context()):
            raise RuntimeError("Attempted to clear component context without"
                               " a bound app context or eager app set! Please"
                               " pass the related app you want to update the"
                               " context for!")

        if self._context is not _CONTEXT_MISSING:
            self._context = DEFAULT_DICT
        else:
            key = self._get_context_name(app=app)
            setattr(_CONTEXT_LOCALS, key, DEFAULT_DICT)