def _api_queue_sort(output, value, kwargs):
 sort = kwargs.get('sort')
 direction = kwargs.get('dir', '')
 if sort:
  sort_queue(sort, direction)
  return report(output)
 else:
  return report(output, _MSG_NO_VALUE2)

def _api_queue_sort ( output , value , kwargs ) : sort = kwargs . get ( 'sort' ) direction = kwargs . get ( 'dir' , '' ) if sort : sort_queue ( sort , direction ) return report ( output ) else : return report ( output , _MSG_NO_VALUE2 )
api: accepts output .