human
Complete this python program:
def RequestsFailedCriteria(request_rate, failed_rate):
assistant
#Here is the Python code you requested.

    """Monitor the rate of failed service requests on the server.  The number of failed
    requests will be compared to the total number of requests to determine if a warning
    is warranted, either for the cluster or for any individual machine.
    """
    alerts = []
    warnings = []
    def _ComputeThreshold(x):
        return math.ceil(math.sqrt(x))
    if (failed_rate['cluster_total'] > _ComputeThreshold(request_rate['cluster_total'])):
        warnings.append(CLUSTER_TOKEN)
    for (m, v) in request_rate['machine_data'].iteritems():
        if (failed_rate['machine_data'][m] > _ComputeThreshold(v)):
            warnings.append(m)
    return (alerts, warnings)