code: def close_drivers(cls, scope, test_name, test_passed=True, context=None):
          
          if scope == 'function':
              # Capture screenshot on error
              if not test_passed:
                  cls.capture_screenshots(test_name)
              # Execute behave dynamic environment
              if context and hasattr(context, 'dyn_env'):
                  context.dyn_env.execute_after_scenario_steps(context)
              # Save webdriver logs on error or if it is enabled
              cls.save_all_webdriver_logs(test_name, test_passed)
  
          # Close browser and stop driver if it must not be reused
          reuse_driver = cls.get_default_wrapper().should_reuse_driver(scope, test_passed, context)
          cls.stop_drivers(reuse_driver)
          cls.download_videos(test_name, test_passed, reuse_driver)
          cls.save_all_ggr_logs(test_name, test_passed)
          cls.remove_drivers(reuse_driver)
docs: Stop all drivers, capture screenshots, copy webdriver and GGR logs and download saved videos
  
          :param scope: execution scope (function, module, class or session)
          :param test_name: executed test name
          :param test_passed: True if the test has passed
          :param context: behave context