def init_driver(client_id):
    """Initialises a new driver via webwhatsapi module
    
    @param client_id: ID of user client
    @return webwhatsapi object
    """

    # Create profile directory if it does not exist
    profile_path = CHROME_CACHE_PATH + str(client_id)
    if not os.path.exists(profile_path):
        os.makedirs(profile_path)
    
    # Options to customize chrome window
    chrome_options = [
        'window-size=' + CHROME_WINDOW_SIZE,
        '--user-agent=Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/60.0.3112.78 Chrome/60.0.3112.78 Safari/537.36'
    ]
    if CHROME_IS_HEADLESS:
        chrome_options.append('--headless')
    if CHROME_DISABLE_GPU:
        chrome_options.append('--disable-gpu')
    
    # Create a whatsapidriver object
    d = WhatsAPIDriver(
        username=client_id, 
        profile=profile_path, 
        client='chrome', 
        chrome_options=chrome_options
    )
    return d
Initialises a new driver via webwhatsapi module
    
    @param client_id: ID of user client
    @return webwhatsapi object