def METHOD_NAME(config_copy):
    for bond, bond_attr in six.viewitems(config_copy.bonds):
        # TODO: globalize default bond options from Bond in models.py
        normalized_opts = _parse_bond_options(bond_attr.get('options'))
        if 'mode' not in normalized_opts:
            normalized_opts['mode'] = '0'
        normalized_opts.pop('custom', None)
        bond_attr['options'] = bonding.bondOptsForIfcfg(normalized_opts)
    # before d18e2f10 bondingOptions were also part of networks, so in case
    # we are upgrading from an older version, they should be ignored if
    # they exist.
    # REQUIRED_FOR upgrade from vdsm<=4.16.20
    for net_attr in six.viewvalues(config_copy.networks):
        net_attr.pop('bondingOptions', None)