@classmethod<EOL><INDENT>def _make_netmask(cls, arg):<DEDENT>
if arg not in cls._netmask_cache:<EOL><INDENT>if isinstance(arg, _compat_int_types):<EOL><INDENT>prefixlen = arg<EOL><DEDENT>else:<EOL><INDENT>try:<EOL><INDENT>prefixlen = cls._prefix_from_prefix_string(arg)<EOL><DEDENT>except NetmaskValueError:<EOL><INDENT>prefixlen = cls._prefix_from_ip_string(arg)<EOL><DEDENT><DEDENT>netmask = IPv4Address(cls._ip_int_from_prefix(prefixlen))<EOL>cls._netmask_cache[arg] = netmask, prefixlen<EOL><DEDENT>return cls._netmask_cache[arg]<EOL>
Make a (netmask, prefix_len) tuple from the given argument.

        Argument can be:
        - an integer (the prefix length)
        - a string representing the prefix length (e.g. "24")
        - a string representing the prefix netmask (e.g. "255.255.255.0")