def udf_report_summary(_response, _run_id):
    """Summarize the status of a completed UDF."""
    
    _statuses = _response['statuses'][_run_id]
    _messages = _response['messages'][_run_id]
    _results = _response['results'][_run_id]
    _timings = _response['timings'][_run_id]

    for _tom in sorted(_statuses):
        _status = _statuses[_tom]
        _message = _messages[_tom]
        _result = _results[_tom]

        _total_str = ''
        _total_ms = _timings[_tom].get('total')
        if(_total_ms != None):
            _total_sec = float(_total_ms) / 1000.0
            _total_str = '(time=%.1f sec)' % _total_sec

        print('TOM %s: [%s] %s %s %s' % (_tom, _status, _result, _message, _total_str))
        
    return _results