code: def check_port_available(port):
      """Return True is port is available to use"""
      while True:
          s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
          try:
              s.bind(("", port))  ## Try to open port
          except OSError as e:
              if (
                  e.errno is 98
              ):  ## Errorno 98 means address already bound
                  return False
              raise e
          s.close()
  
          return True
  
imports: import os
  import argparse
  import time
  import socket
  import sys
  import dgl
  from dgl.contrib import KVServer
  import torch
  from .train_pytorch import load_model
  from .dataloader import get_server_partition_dataset
label_desc: Use image node_id 2 for calling a global function with example usage: check_port_available(port) and returns: True, False