code: def update(self, attributes=None):
          
          resource_type = self._resource_type()
          resource_path = self._resource_path()
          session = self._session
          singleton = self.is_singleton()
          id = None if singleton else self.id
          url = session._build_url(resource_path, id)
          attributes = build_request_body(resource_type, self.id,
                                          attributes=attributes)
          process = self._mk_one(session, singleton=singleton)
          return session.patch(url, CB.json(200, process), json=attributes)
docs: Update this resource.
  
          Not all aspects of a resource can be updated. If the server
          rejects updates an error will be thrown.
  
          Keyword Arguments:
  
            attributes(dict): Attributes that are to be updated
  
          Returns:
  
            Resource: A new instance of this type of resource with the
            updated attribute. On errors an exception is thrown.