code: def profile_speed():
      bcell = SRUCell(400, 200, bidirectional=True)
      bcell.eval()
      mask = torch.zeros(200, 1)
      x = torch.randn(200, 1, 400)
      pr = cProfile.Profile()
      pr.enable()
      with torch.no_grad():
          for i in range(10):
              r = bcell(x, mask_pad=mask)
      pr.disable()
      s = io.StringIO()
      sortby = "cumulative"
      ps = pstats.Stats(pr, stream=s).sort_stats(sortby)
      ps.print_stats()
      print(s.getvalue())
  
      pr = cProfile.Profile()
      pr.enable()
      # with torch.no_grad():
      for i in range(10):
          r = bcell(x, mask_pad=mask)
      pr.disable()
      s = io.StringIO()
      sortby = "cumulative"
      ps = pstats.Stats(pr, stream=s).sort_stats(sortby)
      ps.print_stats()
      print(s.getvalue())
  
imports: import cProfile, pstats, io
  import torch
  from sru import SRUCell
label_desc: Use image node_id 3 for calling a global function with example usage: profile_speed() without return types