code: def box_list_to_box_mask_list(boxlist):
      """Converts a BoxList containing 'masks' into a BoxMaskList.
  
      Args:
        boxlist: An np_box_list.BoxList object.
  
      Returns:
        An np_box_mask_list.BoxMaskList object.
  
      Raises:
        ValueError: If boxlist does not contain `masks` as a field.
      """
      if not boxlist.has_field("masks"):
          raise ValueError("boxlist does not contain mask field.")
      box_mask_list = np_box_mask_list.BoxMaskList(
          box_data=boxlist.get(), mask_data=boxlist.get_field("masks")
      )
      extra_fields = boxlist.get_extra_fields()
      for key in extra_fields:
          if key != "masks":
              box_mask_list.data[key] = boxlist.get_field(key)
      return box_mask_list
  
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 1 for calling a global function with example usage: box_list_to_box_mask_list(boxlist) and returns: box_mask_list