code: def torch_nn_rnn(
      self: torch.nn.RNNCellBase,
      input: torch.Tensor,
      hx: Optional[torch.Tensor] = None,
  ) -> Tuple[int, int]:
      flops = 0
      macs = 0
      w_ih = self.__getattr__("weight_ih_l")
      w_hh = self.__getattr__("weight_hh_l")
      flops, macs = _rnn_flops(flops, macs, self, w_ih, w_hh)
      if self.bias:
          b_ih = self.__getattr__("bias_ih_l")
          b_hh = self.__getattr__("bias_hh_l")
          flops += reduce(operator.mul, b_ih) + reduce(
              operator.mul, b_hh
          )
      flops *= input.shape[0]
      macs *= input.shape[0]
      return flops, macs
  
file_path: ColossalAI/colossalai/fx/profiler/experimental/profiler_module/rnn.py
imports: import operator
  from functools import reduce
  from typing import Optional, Tuple
  import torch
  from ..registry import meta_profiler_module
label_desc: Use image node_id 3 for calling a global function with example usage: torch_nn_rnn(input, hx) and returns: flops,  macs