code: def add_sum(
      val: float,
      nobs: int,
      sum_x: float,
      compensation: float,
      num_consecutive_same_value: int,
      prev_value: float,
  ) -> tuple[int, float, float, int, float]:
      if not np.isnan(val):
          nobs += 1
          y = val - compensation
          t = sum_x + y
          compensation = t - sum_x - y
          sum_x = t
  
          if val == prev_value:
              num_consecutive_same_value += 1
          else:
              num_consecutive_same_value = 1
          prev_value = val
  
      return (
          nobs,
          sum_x,
          compensation,
          num_consecutive_same_value,
          prev_value,
      )
  
imports: from __future__ import annotations
  import numba
  import numpy
  from pandas.core._numba.kernels.shared import is_monotonic_increasing
label_desc: Use image node_id 1 for calling a global function with example usage: add_sum(val, nobs, sum_x, compensation, num_consecutive_same_value, prev_value) and returns: nobs,  sum_x,  compensation,  num_consecutive_same_value,  prev_value