def _validate_dict_keys(dict_to_check, required_keys, optional_keys):
 assert (set(required_keys) <= set(dict_to_check.keys())), ('Missing keys: %s' % dict_to_check)
 assert (set(dict_to_check.keys()) <= set((required_keys + optional_keys))), ('Extra keys: %s' % dict_to_check)

def _validate_dict_keys ( dict_to_check , required_keys , optional_keys ) : assert ( set ( required_keys ) <= set ( dict_to_check . keys ( ) ) ) , ( 'Missing keys: %s' % dict_to_check ) assert ( set ( dict_to_check . keys ( ) ) <= set ( ( required_keys + optional_keys ) ) ) , ( 'Extra keys: %s' % dict_to_check )
checks that all of the required keys .