class_docstr: Base Windows
  
  Base class for all windows-based models. The forecasts are produced separately
  for each window, which are randomly sampled during training.
  
  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 generate windows.
class_docstr_tok: ["Base","Windows","Base","class","for","all","windows-based","models",".","The","forecasts","are","produced","separately","for","each","window",",","which","are","randomly","sampled","during","training",".","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","generate","windows","."]
code: def _parse_windows(self, batch, windows):
      # Filter insample lags from outsample horizon
      y_idx = batch["y_idx"]
      mask_idx = batch["temporal_cols"].get_loc("available_mask")
  
      insample_y = windows["temporal"][:, : self.input_size, y_idx]
      insample_mask = windows["temporal"][
          :, : self.input_size, mask_idx
      ]
  
      # Declare additional information
      outsample_y = None
      outsample_mask = None
      hist_exog = None
      futr_exog = None
      stat_exog = None
  
      if self.h > 0:
          outsample_y = windows["temporal"][:, self.input_size :, y_idx]
          outsample_mask = windows["temporal"][
              :, self.input_size :, mask_idx
          ]
  
      if len(self.hist_exog_list):
          hist_exog_idx = get_indexer_raise_missing(
              windows["temporal_cols"], self.hist_exog_list
          )
          hist_exog = windows["temporal"][
              :, : self.input_size, hist_exog_idx
          ]
  
      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]
  
      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]
  
      # TODO: think a better way of removing insample_y features
      if self.exclude_insample_y:
          insample_y = insample_y * 0
  
      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 BaseWindows 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