def METHOD_NAME(migration_rules, udfs, instance):
    for model in udfs:
        model_rules = migration_rules[model]
        model_rules['removed_fields'] -= set(udfs[model].keys())
        for field, field_rules in udfs[model].items():
            prefixed = 'udf:' + field_rules['udf.name']
            model_rules['renamed_fields'][field] = prefixed
            conversions = {str(i+1): v for i, v in
                           enumerate(field_rules.get('udf.choices', []))}
            if conversions:
                value_transformers = model_rules.get(
                    'value_transformers', {})
                value_transformers[field] = conversions.get
                model_rules['value_transformers'] = value_transformers