def METHOD_NAME(bond_attr, bond_running_config):
    bond_conf = {
        'nics': sorted(bond_attr['slaves']),
        'options': bonding.bondOptsForIfcfg(bond_attr['opts']),
        'switch': bond_attr['switch'],
    }
    hwaddr_explicitly_set = (
        bond_running_config and 'hwaddr' in bond_running_config
    )
    if hwaddr_explicitly_set:
        bond_conf['hwaddr'] = bond_attr['hwaddr']
    return bond_conf