def _auth_cookie(self, session_id=None, **kwargs):
        user = None
        if session_id is not None:
            # Set adama_session cookie
            from time import time
            self.session.cookies.set(
                name='adama_session',
                value=session_id,
                domain=self.api_base,
                expires=kwargs.get('expires', int(time() + 86400)),
            )
        else:
            user, _ = super(T1, self)._post(PATHS['mgmt'], 'login', data={
                'user': self.username,
                'password': self.password,
                'api_key': self.api_key,
            })

        self._check_session(user=user)
        self._authenticated = True
Authenticate using session cookie. If session ID is given, use that.
dataset/ETHPy150Open MediaMath/t1-python/terminalone/service.py/T1._auth_cookie