def _TStrictDictCheck(require_all, exclusive, items, val):
  notfound_fn = lambda _: not exclusive

  if require_all and not frozenset(val.keys()).issuperset(items.keys()):
    # Requires items not found in value
    return False

  return compat.all(items.get(key, notfound_fn)(value)
                    for (key, value) in val.items())
Helper function for L{TStrictDict}.
dataset/ETHPy150Open ganeti/ganeti/lib/ht.py/_TStrictDictCheck