class_docstr: Base Recurrent
  
  Base class for all recurrent-based models. The forecasts are produced sequentially between
  windows.
  
  This class implements the basic functionality for all windows-based models, including:
  - PyTorch Lightning's methods training_step, validation_step, predict_step. <br>
  - fit and predict methods used by NeuralForecast.core class. <br>
  - sampling and wrangling methods to sequential windows. <br>
class_docstr_tok: ["Base","Recurrent","Base","class","for","all","recurrent-based","models",".","The","forecasts","are","produced","sequentially","between","windows",".","This","class","implements","the","basic","functionality","for","all","windows-based","models",",","including",":","-","PyTorch","Lightning","'s","methods","training_step",",","validation_step",",","predict_step",".","<","br",">","-","fit","and","predict","methods","used","by","NeuralForecast.core","class",".","<","br",">","-","sampling","and","wrangling","methods","to","sequential","windows",".","<","br",">"]
code: def _parse_windows(self, batch, windows):
      # [B, C, seq_len, 1+H]
      # Filter insample lags from outsample horizon
      mask_idx = batch["temporal_cols"].get_loc("available_mask")
      y_idx = batch["y_idx"]
      insample_y = windows["temporal"][:, y_idx, :, : -self.h]
      insample_mask = windows["temporal"][:, mask_idx, :, : -self.h]
      outsample_y = windows["temporal"][
          :, y_idx, :, -self.h :
      ].contiguous()
      outsample_mask = windows["temporal"][
          :, mask_idx, :, -self.h :
      ].contiguous()
  
      # Filter historic exogenous variables
      if len(self.hist_exog_list):
          hist_exog_idx = get_indexer_raise_missing(
              windows["temporal_cols"], self.hist_exog_list
          )
          hist_exog = windows["temporal"][
              :, hist_exog_idx, :, : -self.h
          ]
      else:
          hist_exog = None
  
      # Filter future exogenous variables
      if len(self.futr_exog_list):
          futr_exog_idx = get_indexer_raise_missing(
              windows["temporal_cols"], self.futr_exog_list
          )
          futr_exog = windows["temporal"][:, futr_exog_idx, :, :]
      else:
          futr_exog = None
      # Filter static variables
      if len(self.stat_exog_list):
          static_idx = get_indexer_raise_missing(
              windows["static_cols"], self.stat_exog_list
          )
          stat_exog = windows["static"][:, static_idx]
      else:
          stat_exog = None
  
      return (
          insample_y,
          insample_mask,
          outsample_y,
          outsample_mask,
          hist_exog,
          futr_exog,
          stat_exog,
      )
  
imports: import random
  import warnings
  import numpy
  import torch
  import torch.nn
  import pytorch_lightning
  from pytorch_lightning.callbacks import TQDMProgressBar
  from pytorch_lightning.callbacks.early_stopping import EarlyStopping
  from ._scalers import TemporalNorm
  from ..tsdataset import TimeSeriesDataModule
  from ..utils import get_indexer_raise_missing
label_desc: Use image node_id 9 for calling the BaseRecurrent obj's underlying member method code with example usage: obj._parse_windows(batch, windows) and returns: insample_y,  insample_mask,  outsample_y,  outsample_mask,  hist_exog,  futr_exog,  stat_exog