Adds a function merge_factor_levels to merge levels from training and validation data sets.