code: def complex_linear_op(input, real_weight, imag_weight, bias):
      """
      Applies a complex linear transformation to the incoming data.
  
      Arguments
      ---------
      input : torch.Tensor
          Complex input tensor to be transformed.
      real_weight : torch.Parameter
          Real part of the quaternion weight matrix of this layer.
      imag_weight : torch.Parameter
          First imaginary part of the quaternion weight matrix of this layer.
      bias : torch.Parameter
      """
  
      cat_real = torch.cat([real_weight, -imag_weight], dim=0)
      cat_imag = torch.cat([imag_weight, real_weight], dim=0)
      cat_complex = torch.cat([cat_real, cat_imag], dim=1)
  
      # If the input is already [batch*time, N]
      if input.dim() == 2:
          if bias.requires_grad:
              return torch.addmm(bias, input, cat_complex)
          else:
              return torch.mm(input, cat_complex)
      else:
          output = torch.matmul(input, cat_complex)
          if bias.requires_grad:
              return output + bias
          else:
              return output
  
file_path: speechbrain/speechbrain/nnet/complex_networks/c_ops.py
imports: import torch
  import torch.nn.functional
  import numpy
label_desc: Use image node_id 5 for calling a global function with example usage: complex_linear_op(input, real_weight, imag_weight, bias) and returns: torch, torch, unknown, output