def init_app(self, app, context=DEFAULT_DICT):
        """Lazy constructor for the :class:`Component` class.

        This method will allow the component to be used like a Flask
        extension/singleton.

        Args:
            app (flask.Flask): The Application to base this Component upon.
                Useful for app wide singletons.

        Keyword Args:
            context (dict, optional): The contextual information to supply to
                this component.
        """
        if context is not _CONTEXT_MISSING:
            self.update_context(context, app=app)

        # do not readd callbacks if already present; and if there's no context
        # present, there's no real need to add callbacks
        if (app not in _CONTEXT_CALLBACK_MAP
                and context is not _CONTEXT_MISSING):
            key = self._get_context_name(app=app)
            self._context_callbacks(app, key, original_context=context)