code: def polygons_to_mask(polygons, height, width):
      """
      Convert the polygons to mask format
  
      Args:
          polygons (list[ndarray]): each array has shape (Nx2,)
          height (int): mask height
          width (int): mask width
      Returns:
          ndarray: a bool mask of shape (height, width)
      """
      import pycocotools.mask as mask_util
  
      assert (
          len(polygons) > 0
      ), "COCOAPI does not support empty polygons"
      rles = mask_util.frPyObjects(polygons, height, width)
      rle = mask_util.merge(rles)
      return mask_util.decode(rle).astype(np.bool_)
  
file_path: PaddleDetection/ppdet/modeling/proposal_generator/target.py
imports: import numpy
  import paddle
  from ..bbox_utils import bbox2delta, bbox_overlaps
label_desc: Use image node_id 6 for calling a global function with example usage: polygons_to_mask(polygons, height, width) and returns: mask_util