code: def iou(interval_1, interval_2):
      """Compute the IOU between two intervals.
  
      Args:
        interval_1: A tuple (start, end) containing the first interval.
        interval_2: A tuple (start, end) containing the second interval.
  
      Returns:
        The IOU of the two intervals.
      """
      start_1, end_1 = min(*interval_1), max(*interval_1)
      start_2, end_2 = min(*interval_2), max(*interval_2)
  
      intersection = max(0, min(end_1, end_2) - max(start_1, start_2))
      union = min(
          max(end_1, end_2) - min(start_1, start_2),
          end_1 - start_1 + end_2 - start_2,
      )
      result = float(intersection) / (union + 1e-8)
      return result
  
imports: import collections
  import logging
  import random
  import re
  import string
  import numpy
  from scenic.projects.vid2seq.metrics.cider import Cider
  from scenic.projects.vid2seq.metrics.meteor import Meteor
  from scenic.projects.vid2seq.metrics.ptbtokenizer import PTBTokenizer
label_desc: Use image node_id 5 for calling a global function with example usage: iou(interval_1, interval_2) and returns: result