code: def to_mask(polys, size):
      """Convert list of polygons to full size binary mask
  
      Parameters
      ----------
      polys : list of numpy.ndarray
          Numpy.ndarray with shape (N, 2) where N is the number of bounding boxes.
          The second axis represents points of the polygons.
          Specifically, these are :math:`(x, y)`.
      size : tuple
          Tuple of length 2: (width, height).
  
      Returns
      -------
      numpy.ndarray
          Full size binary mask of shape (height, width)
      """
      try_import_pycocotools()
      import pycocotools.mask as cocomask
  
      width, height = size
      polys = [p.flatten().tolist() for p in polys]
      rles = cocomask.frPyObjects(polys, height, width)
      rle = cocomask.merge(rles)
      return cocomask.decode(rle)
  
imports: import copy
  import numpy
  from PIL import Image
  from ..mscoco.utils import try_import_pycocotools
label_desc: Use image node_id 3 for calling a global function with example usage: to_mask(polys, size) and returns: cocomask