code: def get_available_port(self, port_start, port_end):
      def is_available(p):
          with socket.socket(
              socket.AF_INET, socket.SOCK_STREAM
          ) as sock:
              result = sock.connect_ex(("127.0.0.1", p))
              return result != 0
  
      for p in range(port_start, port_end):
          if is_available(p):
              return p
          else:
              logging.info(
                  f"port {p} is not avaible, trying another..."
              )
      invalidOperationError(
          False,
          f"can not find available port in range [{port_start}, {port_end}]",
      )
  
file_path: BigDL/python/ppml/src/bigdl/ppml/fl/utils.py
imports: from bigdl.dllib.utils.common import *
  import unittest
  import socket
  from bigdl.dllib.utils.log4Error import invalidOperationError
label_desc: Use image node_id 3 for calling the FLTest obj's underlying member method code with example usage: obj.get_available_port(port_start, port_end) and returns: unknown, p