code: def output_shape(self) -> torch.Size:
      hidden_size = self.hidden_size * (
          2 if self.layers.bidirectional else 1
      )
      if self.max_sequence_length:
          return torch.Size([self.max_sequence_length, hidden_size])
      return torch.Size([hidden_size])
  
file_path: ludwig/ludwig/modules/recurrent_modules.py
imports: import logging
  from typing import Optional
  import torch
  from torch.nn import GRU, LSTM, RNN
  from ludwig.utils.misc_utils import get_from_registry
  from ludwig.utils.torch_utils import LudwigModule
label_desc: Use image node_id 3 for calling the RecurrentStack obj's underlying member method code with example usage: obj.output_shape() and returns: torch, torch