code: def _interval_intersection(bounds1, bounds2):
      """find the intersection of the intervals in the given bounds
  
      bounds is a list of tuples [(lo,hi),...]
      """
      if not len(bounds2):
          return bounds1 if len(bounds1) else []
      if not len(bounds1):
          return bounds2
      results = []
      for lb, ub in bounds1:  # XXX: is there a better way?
          for lo, hi in bounds2:
              r = l, h = max(lb, lo), min(ub, hi)
              if l < h:  # XXX: what about when l == h?
                  results.append(r)
      return results
  
imports: from functools import reduce
  from collections.abc import Callable
  from mystic._counter import Counter
  from itertools import permutations
  from dill.source import getblocks
  from dill.source import getsource
  from mystic.monitors import Monitor
  from mystic.monitors import VerboseMonitor
  from mystic.monitors import LoggingMonitor
  from mystic.monitors import CustomMonitor
  from mystic.monitors import Null
label_desc: Use image node_id 49 for calling a global function with example usage: _interval_intersection(bounds1, bounds2) and returns: results, unknown, bounds2