@secure_function
def pfxmask(scope, ips, pfxlen):
    """
    Applies the given prefix length to the given ips, resulting in a
    (list of) IP network addresses.