code: def destroy_webdriver(driver):
      
  
      # This is some very flaky code in selenium. Hence the retries
      # and catch-all exceptions
      try:
          retry_call(driver.close, tries=2)
      except Exception:
          pass
      try:
          driver.quit()
      except Exception:
          pass
docs: Destroy a driver