<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def valid_ip_prefix(ip_prefix):
 """Perform a sanity check on ip_prefix. Arguments: ip_prefix (str):
 The IP-Prefix to validate Returns: True if ip_prefix is a valid IPv4 address with prefix length 32 or a valid IPv6 address with prefix length 128, otherwise False """

    try:
        ip_prefix = ipaddress.ip_network(ip_prefix)
    except ValueError:
        return False
    else:
        if ip_prefix.version == 4 and ip_prefix.max_prefixlen != 32:
            return False
        if ip_prefix.version == 6 and ip_prefix.max_prefixlen != 128:
            return False
        return True