def _task_info_format(task_info_ref):
    """Format a task info ref for consumption outside of this module"""
    if task_info_ref is None:
        return {}
    return {'task_id': task_info_ref['task_id'], 'input': task_info_ref[
        'input'], 'result': task_info_ref['result'], 'message':
        task_info_ref['message']}
