<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:

def host_report_msg(hostname, module_name, result, oneline):
    ''' summarize the JSON results for a particular host '''

    failed = utils.is_failed(result)
    msg = ''
    if module_name in [ 'command', 'shell', 'raw' ] and 'ansible_job_id' not in result and result.get('parsed',True) != False:
        if not failed:
            msg = command_generic_msg(hostname, result, oneline, 'success')
        else:
            msg = command_generic_msg(hostname, result, oneline, 'FAILED')
    else:
        if not failed:
            msg = regular_generic_msg(hostname, result, oneline, 'success')
        else:
            msg = regular_generic_msg(hostname, result, oneline, 'FAILED')
    return msg