code: def delta(self, start_delta: float, end_delta: float):
      new_start = self.start + start_delta
      new_end = self.end + end_delta
      if new_start > new_end:
          raise ValueError(
              f"Invalid segment created: expected {new_start} < {new_end}."
          )
  
      return Segment(new_start, new_end, self.src_id)
  
imports: from typing import NamedTuple, Optional
label_desc: Use image node_id 1 for calling the Segment obj's underlying member method code with example usage: obj.delta(start_delta, end_delta) and returns: Segment