code: def iou(masks1, masks2):
      """Computes pairwise intersection-over-union between mask collections.
  
      Args:
        masks1: a numpy array with shape [N, height, width] holding N masks. Masks
          values are of type np.uint8 and values are in {0,1}.
        masks2: a numpy array with shape [M, height, width] holding N masks. Masks
          values are of type np.uint8 and values are in {0,1}.
  
      Returns:
        a numpy array with shape [N, M] representing pairwise iou scores.
  
      Raises:
        ValueError: If masks1 and masks2 are not of type np.uint8.
      """
      if masks1.dtype != np.uint8 or masks2.dtype != np.uint8:
          raise ValueError(
              "masks1 and masks2 should be of type np.uint8"
          )
      intersect = intersection(masks1, masks2)
      area1 = area(masks1)
      area2 = area(masks2)
      union = (
          np.expand_dims(area1, axis=1)
          + np.expand_dims(area2, axis=0)
          - intersect
      )
      return intersect / np.maximum(union, EPSILON)
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import numpy
label_desc: Use image node_id 3 for calling a global function with example usage: iou(masks1, masks2) and returns: unknown