# Lazy objects, for the serializer to find them we put them here

class LazyDriver(object):
    _driver = None

    @classmethod
    def get(cls):
        import os
        if cls._driver is None:
            from pyvirtualdisplay import Display
            display = Display(visible=0, size=(800, 600))
            display.start()
            from selenium import webdriver
            # Configure headless mode
            chrome_options = webdriver.ChromeOptions() #Oops
            chrome_options.add_argument('--verbose')
            chrome_options.add_argument('--ignore-certificate-errors')
            log_path = "/tmp/chromelogpanda{0}".format(os.getpid())
            if not os.path.exists(log_path):
                os.mkdir(log_path)
            chrome_options.add_argument("--log-path {0}/log.txt".format(log_path))
            chrome_options.add_argument("--no-sandbox")
            chrome_options.add_argument("--disable-setuid-sandbox")
            cls._driver = webdriver.Chrome(chrome_options=chrome_options)
        return cls._driver


class LazyPool(object):
    _pool = None
    
    @classmethod
    def get(cls):
        if cls._pool is None:
            import urllib3
            cls._pool = urllib3.PoolManager()
        return cls._pool

@@ -239,16 +239,51 @@
 Display%0A
+            cls._display = display%0A
         
@@ -325,16 +325,17 @@
 ze=(
-800, 600
+1024, 768
 ))%0A 
@@ -1084,16 +1084,112 @@
 driver%0A%0A
+    @classmethod%0A    def reset(cls):%0A        cls._display.stop()%0A        cls._driver.Dispose()%0A%0A
 %0Aclass L

Update lazy helper to support the idea of a reset on bad state.