def _task_format(task_ref, task_info_ref=None):
 task_dict = {'id': task_ref['id'], 'type': task_ref['type'], 'status': task_ref['status'], 'owner': task_ref['owner'], 'expires_at': task_ref['expires_at'], 'created_at': task_ref['created_at'], 'updated_at': task_ref['updated_at'], 'deleted_at': task_ref['deleted_at'], 'deleted': task_ref['deleted']}
 if task_info_ref:
  task_info_dict = {'input': task_info_ref['input'], 'result': task_info_ref['result'], 'message': task_info_ref['message']}
  task_dict.update(task_info_dict)
 return task_dict

def _task_format ( task_ref , task_info_ref = None ) : task_dict = { 'id' : task_ref [ 'id' ] , 'type' : task_ref [ 'type' ] , 'status' : task_ref [ 'status' ] , 'owner' : task_ref [ 'owner' ] , 'expires_at' : task_ref [ 'expires_at' ] , 'created_at' : task_ref [ 'created_at' ] , 'updated_at' : task_ref [ 'updated_at' ] , 'deleted_at' : task_ref [ 'deleted_at' ] , 'deleted' : task_ref [ 'deleted' ] } if task_info_ref : task_info_dict = { 'input' : task_info_ref [ 'input' ] , 'result' : task_info_ref [ 'result' ] , 'message' : task_info_ref [ 'message' ] } task_dict . update ( task_info_dict ) return task_dict
format a task ref for consumption outside of this module .