def METHOD_NAME(result_future):
    """Callback function.
    Calculates the statistics for the prediction result.
    Args:
      result_future: Result future of the RPC.
    """
    exception = result_future.exception()
    if exception:
        result_counter.inc_error()
        print(exception)
    else:
        sys.stdout.write(".")
        sys.stdout.flush()
        response = numpy.array(result_future.result().outputs["scores"].float_val)
        prediction = numpy.argmax(response)
        if label != prediction:
            result_counter.inc_error()
    result_counter.inc_done()
    result_counter.dec_active()