def validate_mapping(mapping):
file_path = os.path.join(os.path.dirname(__file__),<EOL>'<STR_LIT>', '<STR_LIT>')<EOL>with open(file_path, '<STR_LIT:r>') as fh:<EOL><INDENT>validator = Draft4Validator(json.load(fh))<EOL>validator.validate(mapping)<EOL><DEDENT>return mapping<EOL>
Validate a mapping configuration file against the relevant schema.