def supernet(self, prefixlen_diff=<NUM_LIT:1>, new_prefix=None):
if self._prefixlen == <NUM_LIT:0>:<EOL><INDENT>return self<EOL><DEDENT>if new_prefix is not None:<EOL><INDENT>if new_prefix > self._prefixlen:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>if prefixlen_diff != <NUM_LIT:1>:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>prefixlen_diff = self._prefixlen - new_prefix<EOL><DEDENT>new_prefixlen = self.prefixlen - prefixlen_diff<EOL>if new_prefixlen < <NUM_LIT:0>:<EOL><INDENT>raise ValueError(<EOL>'<STR_LIT>' %<EOL>(self.prefixlen, prefixlen_diff))<EOL><DEDENT>return self.__class__((<EOL>int(self.network_address) & (int(self.netmask) << prefixlen_diff),<EOL>new_prefixlen))<EOL>
The supernet containing the current network.

        Args:
            prefixlen_diff: An integer, the amount the prefix length of
              the network should be decreased by.  For example, given a
              /24 network and a prefixlen_diff of 3, a supernet with a
              /21 netmask is returned.

        Returns:
            An IPv4 network object.

        Raises:
            ValueError: If self.prefixlen - prefixlen_diff < 0. I.e., you have
              a negative prefix length.
                OR
            If prefixlen_diff and new_prefix are both set or new_prefix is a
              larger number than the current prefix (larger number means a
              smaller network)