code: def _roll_timeseries_ndarray(data, window):
      """
      data should be a ndarray with num_dim = 2
      first dim is timestamp
      second dim is feature
      """
      assert data.ndim == 2  # (num_timestep, num_feature)
      data = np.expand_dims(
          data, axis=1
      )  # (num_timestep, 1, num_feature)
  
      # window index and capacity
      window_size = window if isinstance(window, int) else max(window)
      if isinstance(window, int):
          window_idx = np.arange(window)
      else:
          window_idx = np.array(window) - 1
  
      roll_data = np.concatenate(
          [_shift(data, i) for i in range(0, -window_size, -1)], axis=1
      )
      roll_data = roll_data[
          : data.shape[0] - window_size + 1, window_idx, :
      ]
      mask = ~np.any(np.isnan(roll_data), axis=(1, 2))
  
      return roll_data, mask
  
file_path: analytics-zoo/pyzoo/zoo/chronos/data/utils/roll.py
imports: import numpy
  import pandas
label_desc: Use image node_id 6 for calling a global function with example usage: _roll_timeseries_ndarray(data, window) and returns: roll_data,  mask