langchain/document_loaders/apify_dataset.py/ApifyDatasetLoader/validate_environment
class ApifyDatasetLoader:    def validate_environment(cls, values: Dict) -> Dict:
        """Validate environment."""

        try:
            from apify_client import ApifyClient

            values["apify_client"] = ApifyClient()
        except ImportError:
            raise ImportError(
                "Could not import apify-client Python package. "
                "Please install it with `pip install apify-client`."
            )

        return values