code: def windowed_run_events_1d(arr, window):
      
      v, rl, pos = rle_1d(arr)
      return (v * rl >= window).sum()
docs: Return the number of runs of a minimum length.
  
      Parameters
      ----------
      arr : bool array
        Input array
  
      window : int
        Minimum run length.
  
      Returns
      -------
      out : func
        Number of distinct runs of a minimum length.