
from __future__ import annotations







def 						_snake_case(  SCREAMING_SNAKE_CASE__    )			->   int:
       if not nums:
              return 0
       lowercase							:					Union[str, Any]	     =				nums[0]
       lowercase							:					int	     =				0
       for num in nums[1:]:
              lowercase							:					Optional[int]	     =				(
                  max_excluding + num,
                  max(SCREAMING_SNAKE_CASE__ ,     SCREAMING_SNAKE_CASE__    ),
              )
       return max(SCREAMING_SNAKE_CASE__ ,     SCREAMING_SNAKE_CASE__    )


if __name__ == "__main__":
  import doctest

  doctest.testmod()


from collections.abc import Callable

import numpy as np







def 						_snake_case(  SCREAMING_SNAKE_CASE__ ,     SCREAMING_SNAKE_CASE__ ,     SCREAMING_SNAKE_CASE__ ,     SCREAMING_SNAKE_CASE__ ,     SCREAMING_SNAKE_CASE__    )			->   np.array:
       lowercase							:					Optional[int]	     =				int(np.ceil((x_end - xa) / step_size    )    )
       lowercase							:					List[Any]	     =				np.zeros((n + 1,)    )
       lowercase							:					Optional[int]	     =				ya
       lowercase							:					Optional[int]	     =				xa

       for k in range(SCREAMING_SNAKE_CASE__    ):
              lowercase							:					str	     =				y[k] + step_size * ode_func(SCREAMING_SNAKE_CASE__ ,     y[k]    )
              lowercase							:					Union[str, Any]	     =				y[k] + (
                  (step_size / 2) * (ode_func(SCREAMING_SNAKE_CASE__ ,     y[k]    ) + ode_func(x + step_size ,     SCREAMING_SNAKE_CASE__    ))
              )
              x += step_size

       return y


if __name__ == "__main__":
  import doctest

  doctest.testmod()
