Assign dictionary key and priority value wherever conditions from a dictionary are met