class_docstr: Binary numpy array representation of a mask.
  
  # Arguments
      data: Mask array, with the dimensions: (num_instances, height, width)
      pad_dim: bool
code: def from_masks(
      cls, masks: Union[EncodedRLEs, Sequence[Mask]], h: int, w: int
  ):
      # HACK: check for backwards compatibility
      if isinstance(masks, EncodedRLEs):
          return masks.to_mask(h, w)
      else:
          masks_arrays = [o.to_mask(h=h, w=w).data for o in masks]
          if len(masks_arrays) == 0:
              return cls(np.array([]))
          else:
              return cls(np.concatenate(masks_arrays))
  
imports: from icevision.imports import *
  from icevision.utils import *
  from PIL import Image
label_desc: Use image node_id 9 for calling the MaskArray obj's underlying member method code with example usage: obj.from_masks(cls, masks, h, w) and returns: masks, cls, cls