code: def __init__(
      self,
      relative_endpoits: List[Tuple[float, float]],
      total_steps: int,
  ):
      endpoints = []
      for e in relative_endpoits:
          index = int(total_steps * e[0])
          assert index >= 0
          endpoints.append((index, e[1]))
  
      super().__init__(
          endpoints, outside_value=relative_endpoits[-1][1]
      )
  
imports: from typing import Tuple, List
label_desc: Use image node_id 1 to create a new RelativePiecewise object from inherited base classes: Piecewise with example: obj = RelativePiecewise(relative_endpoits, total_steps)