<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def init_app(self, app, config=None, statsd=None):
 """Init Flask Extension."""

        if config is not None:
            self.config = config
        elif self.config is None:
            self.config = app.config

        self.messages = self.config.get('EXCEPTION_MESSAGE', True)
        self.prefix = self.config.get('EXCEPTION_PREFIX', DEFAULT_PREFIX)
        self.statsd = statsd