class_docstr: LSTM that can handle zero-length sequences
code: def init_hidden_state(self, x: torch.Tensor) -> HiddenState:
      num_directions = 2 if self.bidirectional else 1
      if self.batch_first:
          batch_size = x.size(0)
      else:
          batch_size = x.size(1)
      hidden = torch.zeros(
          (
              self.num_layers * num_directions,
              batch_size,
              self.hidden_size,
          ),
          device=x.device,
          dtype=x.dtype,
      )
      cell = torch.zeros(
          (
              self.num_layers * num_directions,
              batch_size,
              self.hidden_size,
          ),
          device=x.device,
          dtype=x.dtype,
      )
      return hidden, cell
  
imports: from abc import ABC, abstractmethod
  from typing import Tuple, Type, Union
  import torch
  from torch import nn
  from torch.nn.utils import rnn
label_desc: Use image node_id 2 for calling the LSTM obj's underlying member method code with example usage: obj.init_hidden_state(x) and returns: hidden,  cell