class_docstr: Base class flexible RNNs.
  
  Forward function can handle sequences of length 0.
docstr: Duplicate the hidden_state n_samples times.
  
  Args:
      hidden_state (HiddenState): hidden state to repeat
      n_samples (int): number of repetitions
  
  Returns:
      HiddenState: repeated hidden state
docstr_tok: ["Duplicate","the","hidden_state","n_samples","times",".","Args",":","hidden_state","(","HiddenState",")",":","hidden","state","to","repeat","n_samples","(","int",")",":","number","of","repetitions","Returns",":","HiddenState",":","repeated","hidden","state"]
code: def repeat_interleave(
      self, hidden_state: HiddenState, n_samples: int
  ) -> HiddenState:
      """
      Duplicate the hidden_state n_samples times.
  
      Args:
          hidden_state (HiddenState): hidden state to repeat
          n_samples (int): number of repetitions
  
      Returns:
          HiddenState: repeated hidden state
      """
      pass
  
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 3 for calling the RNN obj's underlying member method code with example usage: obj.repeat_interleave(hidden_state, n_samples) without return types