<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_extension(self, extension):
 """ Specify a broadway extension to initialise .. code-block:: python factory = Factory() factory.add_extension('broadway_sqlalchemy') :param extension: import path to extension :type extension: str """

        instance = werkzeug.utils.import_string(extension)

        if hasattr(instance, 'register'):
            instance.register(self)

        self._extensions.append(instance)