code: def connect(self):
          
          if JwtBuilder is None:
              raise NotConnectedToOpenEdX("This package must be installed in an OpenEdX environment.")
  
          now = int(time())
          jwt = JwtBuilder.create_jwt_for_user(self.user)
          self.client = EdxRestApiClient(
              self.API_BASE_URL, append_slash=self.APPEND_SLASH, jwt=jwt,
          )
          self.expires_at = now + self.expires_in
docs: Connect to the REST API, authenticating with a JWT for the current user.