code: def gather(box_mask_list, indices, fields=None):
      """Gather boxes from np_box_mask_list.BoxMaskList according to indices.
  
      By default, gather returns boxes corresponding to the input index list, as
      well as all additional fields stored in the box_mask_list (indexing into the
      first dimension).  However one can optionally only gather from a
      subset of fields.
  
      Args:
        box_mask_list: np_box_mask_list.BoxMaskList holding N boxes
        indices: a 1-d numpy array of type int_
        fields: (optional) list of fields to also gather from.  If None (default),
            all fields are gathered from.  Pass an empty fields list to only gather
            the box coordinates.
  
      Returns:
        subbox_mask_list: a np_box_mask_list.BoxMaskList corresponding to the subset
            of the input box_mask_list specified by indices
  
      Raises:
        ValueError: if specified field is not contained in box_mask_list or if the
            indices are not of type int_
      """
      if fields is not None:
          if "masks" not in fields:
              fields.append("masks")
      return box_list_to_box_mask_list(
          np_box_list_ops.gather(
              boxlist=box_mask_list, indices=indices, fields=fields
          )
      )
  
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 6 for calling a global function with example usage: gather(box_mask_list, indices, fields) and returns: box_list_to_box_mask_list