Write a script to deploy the Algolia demo app and make sure it is tolerant in the face of failures.
Implement deploy_demo_app(components, max_retries). components is a map from component names to dependency names and a sequence of boolean deployment outcomes. Deploy dependencies before dependents, retry transient failures, and prevent components with failed dependencies from deploying. Return the overall status, successful deployment order, directly failed components, and blocked components. Detect dependency cycles as failures. Each component receives at most max_retries + 1 attempts.
def deploy_demo_app(components, max_retries):