code: def open_server_socket():
      serv_sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
      try:
          serv_sock.bind(("", 0))
      except socket.err as msg:
          print(
              "Bind failed. Error Code : "
              + str(msg[0])
              + " Message "
              + msg[1]
          )
          sys.exit()
      serv_sock.listen(0)
      port = serv_sock.getsockname()[1]
      return port, serv_sock
  
imports: from __future__ import print_function
  import json
  import sys
  import socket
  import itertools
  from .None import functions
  from .None import parallel
  import math
  import multiprocessing
  import threading
label_desc: Use image node_id 9 for calling a global function with example usage: open_server_socket() and returns: port,  serv_sock