class_docstr: Non permanent document
  
  This document is meant for debugging purposes within the EphemeralDB.
  
  .. seealso:: :class:`orion.core.io.database.ephemeraldb.EphemeralDB` for database object.
class_docstr_tok: ["Non","permanent","document","This","document","is","meant","for","debugging","purposes","within","the","EphemeralDB",".","..","seealso",":",":",":","class",":","`","orion.core.io.database.ephemeraldb.EphemeralDB","`","for","database","object","."]
docstr: Update the values of the document.
  
  Parameters
  ----------
  data: dict
      Dictionary of data to update the document. If `$set` is in
      the data, the corresponding `data[$set]` will be used instead.
docstr_tok: ["Update","the","values","of","the","document",".","Parameters","--","--","--","--","--","data",":","dict","Dictionary","of","data","to","update","the","document",".","If","`","$","set","`","is","in","the","data",",","the","corresponding","`","data","[","$","set","]","`","will","be","used","instead","."]
code: def update(self, data):
      """Update the values of the document.
  
      Parameters
      ----------
      data: dict
          Dictionary of data to update the document. If `$set` is in
          the data, the corresponding `data[$set]` will be used instead.
  
      """
      if "$set" in data:
          unflattened_data = unflatten(self._data)
          for key, value in data["$set"].items():
              if isinstance(value, dict):
                  value = flatten(value)
              unflattened_data[key] = value
          self._data = flatten(unflattened_data)
      else:
          self._data.update(flatten(data))
  
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 8 for calling the EphemeralDocument obj's underlying member method code with example usage: obj.update(data) without return types