def is_valid_vpnv4_prefix(prefix):
 if (not isinstance(prefix, str)):
  return False
 tokens = prefix.split(':', 2)
 if (len(tokens) != 3):
  return False
 if (not is_valid_route_dist(':'.join([tokens[0], tokens[1]]))):
  return False
 return is_valid_ipv4_prefix(tokens[2])

def is_valid_vpnv4_prefix ( prefix ) : if ( not isinstance ( prefix , str ) ) : return False tokens = prefix . split ( ':' , 2 ) if ( len ( tokens ) != 3 ) : return False if ( not is_valid_route_dist ( ':' . join ( [ tokens [ 0 ] , tokens [ 1 ] ] ) ) ) : return False return is_valid_ipv4_prefix ( tokens [ 2 ] )
returns true if given prefix is a string represent vpnv4 prefix .