def METHOD_NAME(web_driver: WebDriver) -> float:
    calculate_web_driver_device_pixel_ratio = """\
        return window.devicePixelRatio
    """
    device_pixel_ratio: float = web_driver.execute_script(calculate_web_driver_device_pixel_ratio)
    return device_pixel_ratio