class_docstr: Non permanent collection
  
  This collection is meant for debugging purposes within the EphemeralDB.
  
  .. seealso:: :class:`orion.core.io.database.ephemeraldb.EphemeralDB` for database object.
class_docstr_tok: ["Non","permanent","collection","This","collection","is","meant","for","debugging","purposes","within","the","EphemeralDB",".","..","seealso",":",":",":","class",":","`","orion.core.io.database.ephemeraldb.EphemeralDB","`","for","database","object","."]
docstr: Update documents matching the query
  
  Raises
  ------
  DuplicateKeyError
      If the update creates a duplication of unique indexes in the database.
docstr_tok: ["Update","documents","matching","the","query","Raises","--","--","--","DuplicateKeyError","If","the","update","creates","a","duplication","of","unique","indexes","in","the","database","."]
code: def update_many(self, query, update):
      """Update documents matching the query
  
      Raises
      ------
      DuplicateKeyError
          If the update creates a duplication of unique indexes in the database.
  
      """
      updates = 0
      for document in self._documents:
          if document.match(query):
              document.update(update)
              updates += 1
  
      return updates
  
imports: import copy
  from collections import defaultdict
  from orion.core.io.database import Database, DatabaseError, DuplicateKeyError
  from orion.core.utils.flatten import flatten, unflatten
label_desc: Use image node_id 10 for calling the EphemeralCollection obj's underlying member method code with example usage: obj.update_many(query, update) and returns: updates