code: def check_webserver_running(url="http://localhost:8800", max_retries=30):
      
  
      retry = 0
      response = ''
      success = False
  
      while response != requests.codes.ok and retry < max_retries:
          try:
              response = requests.head(url, allow_redirects=True).status_code
              success = True
          except:
              sleep(1)
  
          retry += 1
  
      if not success:
          logging.warning('Unable to connect to %s within %s retries'
                       % (url, max_retries))
      return success
docs: Returns True if a given URL is responding within a given timeout.