code: def complex_conv_op(
      input,
      real_weight,
      imag_weight,
      bias,
      stride,
      padding,
      dilation,
      conv1d,
  ):
      """Applies a complex convolution to the incoming data.
  
      Arguments
      ---------
      input : torch.Tensor
          Complex input tensor to be transformed.
      conv1d : bool
          If true, a 1D convolution operation will be applied. Otherwise, a 2D
          convolution is called.
      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
      stride : int
          Stride factor of the convolutional filters.
      padding : int
          Amount of padding. See torch.nn documentation for more information.
      dilation : int
          Dilation factor of the convolutional filters.
      """
      cat_real = torch.cat([real_weight, -imag_weight], dim=1)
      cat_imag = torch.cat([imag_weight, real_weight], dim=1)
      cat_complex = torch.cat([cat_real, cat_imag], dim=0)
  
      if conv1d:
          convfunc = F.conv1d
      else:
          convfunc = F.conv2d
  
      return convfunc(
          input, cat_complex, bias, stride, padding, dilation
      )
  
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 6 for calling a global function with example usage: complex_conv_op(input, real_weight, imag_weight, bias, stride, padding, dilation, conv1d) and returns: convfunc