code: def is_server_running(host, port):
      
      s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
      try:
          return s.connect_ex((host, port)) == 0
      finally:
          s.close()
docs: Checks whether a server is currently listening on the specified
      host and port.