code: def sort_by_field(
      box_mask_list, field, order=np_box_list_ops.SortOrder.DESCEND
  ):
      """Sort boxes and associated fields according to a scalar field.
  
      A common use case is reordering the boxes according to descending scores.
  
      Args:
        box_mask_list: BoxMaskList holding N boxes.
        field: A BoxMaskList field for sorting and reordering the BoxMaskList.
        order: (Optional) 'descend' or 'ascend'. Default is descend.
  
      Returns:
        sorted_box_mask_list: A sorted BoxMaskList with the field in the specified
          order.
      """
      return box_list_to_box_mask_list(
          np_box_list_ops.sort_by_field(
              boxlist=box_mask_list, field=field, order=order
          )
      )
  
file_path: SlowFast/ava_evaluation/np_box_mask_list_ops.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import numpy
  from .None import np_box_list_ops, np_box_mask_list, np_mask_ops
label_desc: Use image node_id 7 for calling a global function with example usage: sort_by_field(box_mask_list, field, order) and returns: box_list_to_box_mask_list