def validate_port(port):
    start, end = 1, 65535
    if port < start or port > end:
        raise Exception('Bad port number: %d' % port)
are the given ports valid TCP/UDP ports?
dataset/ETHPy150Open pinterest/kingpin/kingpin/zk_register/zk_register.py/validate_port