<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def stop_drivers(cls, maintain_default=False):
 """Stop all drivers except default if it should be reused :param maintain_default: True if the default driver should not be closed """

        # Exclude first wrapper if the driver must be reused
        driver_wrappers = cls.driver_wrappers[1:] if maintain_default else cls.driver_wrappers

        for driver_wrapper in driver_wrappers:
            if not driver_wrapper.driver:
                continue
            try:
                driver_wrapper.driver.quit()
            except Exception as e:
                driver_wrapper.logger.warn(
                    "Capture exceptions to avoid errors in teardown method due to session timeouts: \n %s" % e)