code: def iou(self, other):
          
          inters = self.intersection(other)
          if inters is None:
              return 0.0
          else:
              area_union = self.area + other.area - inters.area
              return inters.area / area_union if area_union > 0 else 0.0
docs: Compute the IoU of this bounding box with another one.
  
          IoU is the intersection over union, defined as::
  
              ``area(intersection(A, B)) / area(union(A, B))``
              ``= area(intersection(A, B)) / (area(A) + area(B) - area(intersection(A, B)))``
  
          Parameters
          ----------
          other : imgaug.BoundingBox
              Other bounding box with which to compare.
  
          Returns
          -------
          float
              IoU between the two bounding boxes.