code: def _merge_old(
      self,
      values: np.ndarray,
      last_step: np.ndarray,
      steps: np.ndarray,
      prev_last_step: int = 0,
      i: int = 0,  # from_step
  ):
      # Assumes that steps are evenly spaced
      j = i + 1
      while j < len(values):
          if (
              last_step[j] - prev_last_step < self.step_gap
              or last_step[j] - last_step[j - 1] < 1e-3
          ):  # merge
              iw = max(1.0, last_step[i] - prev_last_step)
              jw = max(1.0, last_step[j] - last_step[i])
              steps[i] = (steps[i] * iw + steps[j] * jw) / (iw + jw)
              values[i] = (values[i] * iw + values[j] * jw) / (iw + jw)
              last_step[i] = last_step[j]
              j += 1
          else:  # move to next
              prev_last_step = last_step[i]
              i += 1
              last_step[i] = last_step[j]
              steps[i] = steps[j]
              values[i] = values[j]
              j += 1
  
      return i + 1
  
imports: import math
  from typing import Dict, List, Optional, Union
  from datetime import datetime, timedelta
  import numpy
label_desc: Use image node_id 11 for calling the Series obj's underlying member method code with example usage: obj._merge_old(values, last_step, steps, prev_last_step, i) and returns: unknown