langchain/agents/agent_toolkits/playwright/toolkit.py/PlayWrightBrowserToolkit/validate_imports_and_browser_provided
class PlayWrightBrowserToolkit:    def validate_imports_and_browser_provided(cls, values: dict) -> dict:
        """Check that the arguments are valid."""
        lazy_import_playwright_browsers()
        if values.get("async_browser") is None and values.get("sync_browser") is None:
            raise ValueError("Either async_browser or sync_browser must be specified.")
        return values