code: def login(self, username, password):
          
  
          data = self._authenticate(
              grant_type='password',
              username=username,
              password=password,
              client_id=self._client_id,
              client_secret=self._client_secret
          )
  
          self._username = username
          self._password = password
  
          return data
docs: Authenticate with the server.
  
          :param username: The username of an existing user
          :param password: The password for the user
          :return: The authentication response from the REST endpoint