def normalize(yml_dict, validator, schema, plot_types):
    """
    Inputs:
        :yml_dict: (dictionary) the dictionary to be normalized against a schema
        :validator: (SimmerValidator) the validator object used.
        :schema: the schema against which the yml_dict is normalized.
        :plot_types: (list of strings) the basic plot_types that must be in
            the uppermost keys.

    Outputs:
        :normalized: normalized dictionary.
    """
    validator.schema = schema
    for plot_type in plot_types:
        if plot_type not in yml_dict.keys():
            yml_dict[plot_type] = {}
    normalized = validator.normalized(yml_dict)
    return normalized