def make_daysetting_from_data(data):
    """ Constructs a new setting from a given dataset. This method will automatically
    instantiate a new class matching the type of the given dataset. It will fill
    all values provided by the dataset and then return the created instance """
    factory = {"color": ColorType, "scalar": ScalarType}
    return make_setting_from_factory(data, factory)
 Constructs a new setting from a given dataset. This method will automatically
    instantiate a new class matching the type of the given dataset. It will fill
    all values provided by the dataset and then return the created instance 
metadrive/render_pipeline/rpcore/pluginbase/day_setting_types.py