def register(self, app, *args, **kwargs):

        if not self._login_manager or self.app != app:
            self._login_manager = LoginManager()
            self._login_manager.user_callback = self.user_loader
            self._login_manager.init_app(app)
            self._login_manager.login_view = app.config.get('AUTH_LOGIN_VIEW', 'code.index')
            self._login_manager.login_message = u'You need to be signed in for this page.'

        self.app = app

        if not self._principal:
            self._principal = Principal(app)
            identity_loaded.connect(self.identity_loaded)

        super(UserManager, self).register(app, *args, **kwargs)
Butler-Portugal algorithm for tensor canonicalization with dummy indices
dataset/ETHPy150Open klen/Flask-Foundation/base/auth/utils.py/UserManager.register--crossover with--dataset/ETHPy150Open sympy/sympy/sympy/combinatorics/tensor_can.py/double_coset_can_rep