'Helper for add_scopes, replace_scopes, remove_scopes.'

def _update(self, scopes_data, note, note_url):

    if (note is not None):
        scopes_data[u'note'] = note
    if (note_url is not None):
        scopes_data[u'note_url'] = note_url
    json = self._json(self._post(self._api, data=scopes_data), 200)
    if json:
        self._update_attributes(json)
        return True
    return False
