def combination_matches(combination, match_combinations):
 for cmatch in match_combinations:
  for (key, val) in combination.items():
   if (cmatch.get(key, val) != val):
    break
  else:
   return True
 return False

def combination_matches ( combination , match_combinations ) : for cmatch in match_combinations : for ( key , val ) in combination . items ( ) : if ( cmatch . get ( key , val ) != val ) : break else : return True return False
checks if the given combination is matches for any of the given combination globs .