code: def profile_with_transpose(rnn, input_t, output_t, device):
      rnn.zero_grad()
      input_t, output_t, rnn = (
          input_t.to(device),
          output_t.to(device),
          rnn.to(device),
      )
      preds, state = rnn(input_t)
      preds = preds.transpose(0, 1)
      output = loss(preds[:, -1, :], output_t)
      print(f"Loss: {output.item()}")
      output.backward()
      grads = [
          p.grad.data.sum() for p in rnn.parameters() if p.requires_grad
      ]
      print(f"sum of Gradients: {torch.stack(grads).sum()}")
  
imports: from sru import SRU
  import torch
label_desc: Use image node_id 2 for calling a global function with example usage: profile_with_transpose(rnn, input_t, output_t, device) without return types