'Updates the embedded documents with the given update values.
.. note::
The embedded document changes are not automatically saved
to the database after calling this method.
:param update: A dictionary of update values to apply to each
embedded document.
:return: The number of entries updated.'

def update(self, **update):

    if (len(update) == 0):
        return 0
    values = list(self)
    for item in values:
        for (k, v) in update.items():
            setattr(item, k, v)
    return len(values)
