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: Validate index values of a document
  
  Raises
  ------
  DuplicateKeyError
      If the document contains unique indexes which are already present in the database.
docstr_tok: ["Validate","index","values","of","a","document","Raises","--","--","--","DuplicateKeyError","If","the","document","contains","unique","indexes","which","are","already","present","in","the","database","."]
code: def _validate_index(self, document, indexes=None):
      """Validate index values of a document
  
      Raises
      ------
      DuplicateKeyError
          If the document contains unique indexes which are already present in the database.
  
      """
      if indexes is None:
          indexes = self._indexes.keys()
  
      for name in indexes:
          keys, data = self._indexes[name]
          document_values = tuple(document[key] for key in keys)
          if document_values in data:
              raise DuplicateKeyError(
                  f"Duplicate key error: index={name} value={document_values}"
              )
  
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 7 for calling the EphemeralCollection obj's underlying member method code with example usage: obj._validate_index(document, indexes) without return types