def affine_gap_penalty(length: Int, open_: Int, extend: Int) -> Int: return open_ + (length - 1) * extend