code: def url_ok(url, port):
      # Use httplib on Python 2
      try:
          from http.client import HTTPConnection
      except ImportError:
          from httplib import HTTPConnection
  
      try:
          conn = HTTPConnection(url, port)
          conn.request("GET", "/")
          r = conn.getresponse()
          return r.status == 200
      except:
          logger.exception("Server not started")
          return False
  
file_path: doc-parsr/demo/doc-versioning/doc_versioning/src/backend/main.py
imports: import logging
  import webview
  from contextlib import redirect_stdout
  from io import StringIO
  from threading import Thread, Lock
  from time import sleep
  from .server import run_server
label_desc: Use image node_id 1 for calling a global function with example usage: url_ok(url, port) and returns: unknown, False