def get_available_port():
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)<EOL>s.bind(('<STR_LIT>', <NUM_LIT:0>))<EOL>port = s.getsockname()[<NUM_LIT:1>]<EOL>s.close()<EOL>return port<EOL>
Complete hack. Some operating systems may not release
        the file descriptor straight away. So it will fail to
        bind when creating the node server itself.