code: def seq_linear(linear, x):
      """linear transform for 3-d tensor"""
      batch, hidden_size, length, _ = x.size()
      h = linear(
          torch.transpose(x, 1, 2)
          .contiguous()
          .view(batch * length, hidden_size)
      )
      return torch.transpose(
          h.view(batch, length, hidden_size, 1), 1, 2
      )
  
file_path: OpenNMT-py/onmt/modules/conv_multi_step_attention.py
imports: import torch
  import torch.nn
  import torch.nn.functional
label_desc: Use image node_id 1 for calling a global function with example usage: seq_linear(linear, x) and returns: torch