def attribute_map_set(self, address, attribute_maps,
                          route_dist=None, route_family=RF_VPN_V4):
        """This method sets attribute mapping to a neighbor.
        attribute mapping can be used when you want to apply
        attribute to BGPUpdate under specific conditions.

        ``address`` specifies the IP address of the neighbor

        ``attribute_maps`` specifies attribute_map list that are used
        before paths are advertised. All the items in the list must
        be an instance of AttributeMap class

        ``route_dist`` specifies route dist in which attribute_maps
        are added.

        ``route_family`` specifies route family of the VRF.
        This parameter must be RF_VPN_V4 or RF_VPN_V6.

        We can set AttributeMap to a neighbor as follows;

          pref_filter = PrefixFilter('192.168.103.0/30',
                                     PrefixFilter.POLICY_PERMIT)

          attribute_map = AttributeMap([pref_filter],
                                       AttributeMap.ATTR_LOCAL_PREF, 250)

          speaker.attribute_map_set('192.168.50.102', [attribute_map])

        """

        assert (RF_VPN_V4, RF_VPN_V6) in route_family,\
            'route_family must be RF_VPN_V4 or RF_VPN_V6'

        func_name = 'neighbor.attribute_map.set'
        param = {}
        param[neighbors.IP_ADDRESS] = address
        param[neighbors.ATTRIBUTE_MAP] = attribute_maps
        if route_dist is not None:
            param[vrfs.ROUTE_DISTINGUISHER] = route_dist
            param[vrfs.VRF_RF] = route_family
        call(func_name, **param)
dataset/ETHPy150Open osrg/ryu/ryu/services/protocols/bgp/bgpspeaker.py/BGPSpeaker.attribute_map_set/swapped operands of `in`