@property
    def wildcards(self):
        """Create a Wildcards object representing the wildcards of this flow.

        Any attribute set to None is considered to be wildcarded.

        Returns:
            A new Wildcards object.
        """
        if self.nw_src is None:
            wild_nw_src = 32
        else:
            _, prefix_length = self.nw_src
            if prefix_length < 1 or prefix_length > 32:
                raise ValueError('invalid nw_src prefix_length', prefix_length)
            wild_nw_src = 32 - prefix_length

        if self.nw_dst is None:
            wild_nw_dst = 32
        else:
            _, prefix_length = self.nw_dst
            if prefix_length < 1 or prefix_length > 32:
                raise ValueError('invalid nw_dst prefix_length', prefix_length)
            wild_nw_dst = 32 - prefix_length

        return Wildcards(in_port=self.in_port is None,
                         dl_src=self.dl_src is None,
                         dl_dst=self.dl_dst is None,
                         dl_vlan=self.dl_vlan is None,
                         dl_vlan_pcp=self.dl_vlan_pcp is None,
                         dl_type=self.dl_type is None,
                         nw_tos=self.nw_tos is None,
                         nw_proto=self.nw_proto is None,
                         nw_src=wild_nw_src,
                         nw_dst=wild_nw_dst,
                         tp_src=self.tp_src is None,
                         tp_dst=self.tp_dst is None)
dataset/ETHPy150Open rlenglet/openfaucet/src/openfaucet/ofmatch.py/Match.wildcards/original