code: def test_bi_fwd_cpu():
      cell = SRUCell(5, 5, bidirectional=True)
      x = torch.randn(7, 1, 5)
      mask = torch.zeros(7, 1)
      mask[0, 0] = 1
      mask[6, 0] = 1
      with torch.no_grad():
          out_1 = cell(x)
      out_2 = cell(x)
      print("----------")
      print(
          "CPU bi-fwd optimized: {} {}".format(
              out_1[0].sum(), out_1[1].sum()
          )
      )
      print(
          "CPU bi-fwd unoptimized: {} {}".format(
              out_2[0].sum(), out_2[1].sum()
          )
      )
      print("----------")
      print("")
  
imports: import cProfile, pstats, io
  import torch
  from sru import SRUCell
label_desc: Use image node_id 2 for calling a global function with example usage: test_bi_fwd_cpu() without return types