def _validate_config(self):
<EOL>if not self.backend:<EOL><INDENT>return<EOL><DEDENT>if len(self.REQUIRED_CONFIG_KEYS) < <NUM_LIT:1>:<EOL><INDENT>return<EOL><DEDENT>self.config = self.config or {}  <EOL>required_keys_set = set(self.REQUIRED_CONFIG_KEYS)<EOL>config_keys_set = set(self.config.keys())<EOL>missing_required_keys = required_keys_set - config_keys_set<EOL>unrecognized_keys = config_keys_set - required_keys_set<EOL>if len(missing_required_keys) > <NUM_LIT:0>:<EOL><INDENT>missing_keys_string = '<STR_LIT:U+002CU+0020>'.join(missing_required_keys)<EOL>raise ValidationError(_('<STR_LIT>') % missing_keys_string)<EOL><DEDENT>elif len(unrecognized_keys) > <NUM_LIT:0>:<EOL><INDENT>unrecognized_keys_string = '<STR_LIT:U+002CU+0020>'.join(unrecognized_keys)<EOL>raise ValidationError(_('<STR_LIT>') % unrecognized_keys_string)<EOL><DEDENT>
ensure REQUIRED_CONFIG_KEYS are filled