def _set_vars(fis, kwargs):
    'Return a modified version of the FIS, setting the changes in the parameters described by kwargs'
    description = fis._get_description()
    positions = {variable['name']: i for (i, variable) in enumerate(description['variables'])}
    for (code, parameter_value) in kwargs.items():
        if code.startswith('var_'):
            (_, variable_name, fuzzy_value, parameter) = code.split('_')
            description['variables'][positions[variable_name]]['values'][fuzzy_value][parameter] = parameter_value
        elif code.startswith('target_'):
            (_, _, fuzzy_value, parameter) = code.split('_')
            description['target']['values'][fuzzy_value][parameter] = parameter_value
        elif (code in ['defuzzification']):
            description[code] = parameter_value
        else:
            raise ValueError(('Parameter not supported: %s' % code))
    return FIS._from_description(description)
Return a modified version of the FIS, setting the changes in the parameters described by kwargs
def _set_vars(fis, kwargs):
    
    description = fis._get_description()
    positions = {variable['name']: i for (i, variable) in enumerate(description['variables'])}
    for (code, parameter_value) in kwargs.items():
        if code.startswith('var_'):
            (_, variable_name, fuzzy_value, parameter) = code.split('_')
            description['variables'][positions[variable_name]]['values'][fuzzy_value][parameter] = parameter_value
        elif code.startswith('target_'):
            (_, _, fuzzy_value, parameter) = code.split('_')
            description['target']['values'][fuzzy_value][parameter] = parameter_value
        elif (code in ['defuzzification']):
            description[code] = parameter_value
        else:
            raise ValueError(('Parameter not supported: %s' % code))
    return FIS._from_description(description)