code: def get_rnn(cell_type: Union[Type[RNN], str]) -> Type[RNN]:
      """
      Get LSTM or GRU.
  
      Args:
          cell_type (Union[RNN, str]): "LSTM" or "GRU"
  
      Returns:
          Type[RNN]: returns GRU or LSTM RNN module
      """
      if isinstance(cell_type, RNN):
          rnn = cell_type
      elif cell_type == "LSTM":
          rnn = LSTM
      elif cell_type == "GRU":
          rnn = GRU
      else:
          raise ValueError(
              f"RNN type {cell_type} is not supported. supported: [LSTM, GRU]"
          )
      return rnn
  
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 1 for calling a global function with example usage: get_rnn(cell_type) and returns: rnn