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: Test if a data corresponding to the given key is in agreement with the given
  value based on the operator defined within the key.
  
  Default operator is equal when no operator is defined.
  Other operators could be $ne, $in, $gte, $gt or $lte. They are defined
  in the last section of the key. For example: `abc.def.$in` or `abc.def.$gte`.
docstr_tok: ["Test","if","a","data","corresponding","to","the","given","key","is","in","agreement","with","the","given","value","based","on","the","operator","defined","within","the","key",".","Default","operator","is","equal","when","no","operator","is","defined",".","Other","operators","could","be","$","ne",",","$","in",",","$","gte",",","$","gt","or","$","lte",".","They","are","defined","in","the","last","section","of","the","key",".","For","example",":","`","abc.def.","$","in","`","or","`","abc.def.","$","gte","`","."]
code: def match_key(self, key, value):
      """Test if a data corresponding to the given key is in agreement with the given
      value based on the operator defined within the key.
  
      Default operator is equal when no operator is defined.
      Other operators could be $ne, $in, $gte, $gt or $lte. They are defined
      in the last section of the key. For example: `abc.def.$in` or `abc.def.$gte`.
      """
      if self._is_operator(key):
          key, operator = self._get_key_operator(key)
  
          return key in self and operator(self[key], value)
  
      return key in self and self[key] == value
  
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 5 for calling the EphemeralDocument obj's underlying member method code with example usage: obj.match_key(key, value) and returns: unknown, unknown