def METHOD_NAME(self, extension):
    self._extensions.add(extension)
    if not self.is_closed():
        conn = self.connection()
        conn.enableloadextension(True)
        conn.loadextension(extension)