code: def update_note(self, note):
          
          # determine whether to create a new note or update an existing one
          # Also need to add/remove key field to keep simplenote.py consistency
          if "key" in note:
              # Then already have a noteid we need to remove before passing to Simperium API
              noteid = note.pop("key", None)
          else:
              # Adding a new note
              noteid = uuid.uuid4().hex
  
  
          # TODO: Set a ccid?
          # ccid = uuid.uuid4().hex
          if "version" in note:
              version = note.pop("version", None)
              url = '%s/i/%s/v/%s?response=1' % (DATA_URL, noteid, version)
          else:
              url = '%s/i/%s?response=1' % (DATA_URL, noteid)
  
          # TODO: Could do with being consistent here. Everywhere else is Request(DATA_URL+params)
          note = self.__remove_simplenote_api_fields(note)
          request = Request(url, data=json.dumps(note).encode('utf-8'))
          request.add_header(self.header, self.get_token())
          request.add_header('Content-Type', 'application/json')
  
          response = ""
          try:
              response = urllib2.urlopen(request)
          except HTTPError as e:
              if e.code == 401:
                  raise SimplenoteLoginFailed('Login to Simplenote API failed! Check Token.')
              else:
                  return e, -1
          except IOError as e:
              return e, -1
          note = json.loads(response.read().decode('utf-8'))
          note = self.__add_simplenote_api_fields(note, noteid, int(response.info().get("X-Simperium-Version")))
          return note, 0
docs: Method to update a specific note object, if the note object does not
          have a "key" field, a new note is created
  
          Arguments
              - note (dict): note object to update
  
          Returns:
              A tuple `(note, status)`
              - note (dict): note object
              - status (int): 0 on success and -1 otherwise