code: def _interpolate_bounding_box(
      before: Dict[str, Any],
      after: Dict[str, Any],
      delta: float,
      range_delta: float,
  ) -> Tuple[float, float, float, float]:
      """Given two adjacent bounding box annotations, return an interpolated label.
  
      Note that @delta and @range_delta must be positive, and @delta must be between 0 and
      `range_delta`, inclusively.
  
      Args:
          before: Bounding box label with lesser timestamp.
          after: Bounding box label with greater timestamp.
          delta: Time after `before` to compute label.
          range_delta: Time separating `before` and `after`.
  
      Returns:
          Bounding box label that is linearly interpolated between `before` and `after`.
      """
      if range_delta < 0:
          raise ValueError(
              f"@range_delta must be positive. Got range_delta={range_delta}."
          )
      if delta < 0 or delta - range_delta > EPS:
          # Some floating point arithmatic causes delta-range_delta to be a small value
          # above zero even if they're equal. Hence the epsilon.
          raise ValueError(
              f"@delta must be between 0 and @range_delta, inclusively. Got delta={delta},"
              f"range_delta={range_delta}."
          )
  
      ret = []
      for key in ["x0", "x1", "y0", "y1"]:
          if range_delta < 1e-5:
              ret.append(before[key])
          else:
              alpha = 1.0 - delta / range_delta
              interpolated_value = before[key] * alpha + after[key] * (
                  1.0 - alpha
              )
              ret.append(interpolated_value)
  
      return tuple(ret)
  
file_path: ml-cvnets/data/datasets/utils/video.py
imports: import functools
  from typing import Any, Collection, Dict, List, Optional, Tuple
  import numpy
  from utils import logger
label_desc: Use image node_id 8 for calling a global function with example usage: _interpolate_bounding_box(before, after, delta, range_delta) and returns: tuple