def METHOD_NAME(client, desired_status, timeout=900):
    """
    Waits for the test cluster to reach the desired status. Errors if the timeout
    is reached.
    """
    print(f"Waiting for {CLUSTER_NAME} cluster to enter {desired_status} status...")
    status = _get_cluster_status(client, CLUSTER_NAME)
    start = time.time()
    while status != desired_status:
        if time.time() > start + timeout:
            sys.exit(f"Reached timeout waiting for {CLUSTER_NAME} cluster to reach {status} status")
        time.sleep(15)
        status = _get_cluster_status(client, CLUSTER_NAME)
    print(f"{CLUSTER_NAME} cluster has reached {status} status")