code: def c_norm(
      input_centred,
      Vrr,
      Vii,
      Vri,
      beta,
      gamma_rr,
      gamma_ri,
      gamma_ii,
      scale=True,
      center=True,
      layernorm=False,
      dim=-1,
  ):
      """This function is used to apply the complex normalization
      as introduced by "Deep Complex Networks", Trabelsi C. et al.
  
      Arguments
      ---------
      input_centred : torch.Tensor
          It is the tensor to be normalized. The features
          dimension is divided by 2 with the first half
          corresponding to the real-parts and the second half
          to the imaginary parts.
      Vrr : torch.Tensor
          It is a tensor that contains the covariance between real-parts.
      Vii : torch.Tensor
          It is a tensor that contains the covariance between imaginary-parts.
      Vri : torch.Tensor
          It is a tensor that contains the covariance between real-parts and
          imaginary-parts.
      beta : torch.Tensor
          It is a tensor corresponding to the beta parameter on the real-valued
          batch-normalization, but in the complex-valued space.
      gamma_rr : torch.Tensor
          It is a tensor that contains the gamma between real-parts.
      gamma_ii : torch.Tensor
          It is a tensor that contains the gamma between imaginary-parts.
      gamma_ri : torch.Tensor
          It is a tensor that contains the gamma between real-parts and
          imaginary-parts.
      scale : bool, optional
          It defines if scaling should be used or not. It is
          equivalent to the real-valued batchnormalization
          scaling (default True).
      center : bool, optional,
          It defines if centering should be used or not. It is
          equivalent to the real-valued batchnormalization centering
          (default True).
      layernorm : bool, optional
          It defines is c_standardization is called from a layernorm or a
          batchnorm layer (default False).
      dim : int, optional
          It defines the axis that should be considered as the complex-valued
          axis (divided by 2 to get r and i) (default -1).
      """
  
      ndim = input_centred.dim()
      input_dim = input_centred.size(dim) // 2
      if scale:
          gamma_broadcast_shape = [1] * ndim
          gamma_broadcast_shape[dim] = input_dim
      if center:
          broadcast_beta_shape = [1] * ndim
          broadcast_beta_shape[dim] = input_dim * 2
  
      if scale:
          standardized_output = c_standardization(
              input_centred, Vrr, Vii, Vri, layernorm, dim=dim
          )
  
          # Now we perform the scaling and Shifting of the normalized x using
          # the scaling parameter
          #           [  gamma_rr gamma_ri  ]
          #   Gamma = [  gamma_ri gamma_ii  ]
          # and the shifting parameter
          #    Beta = [beta_real beta_imag].T
          # where:
          # x_real_BN = gamma_rr * x_real_normed +
          #             gamma_ri * x_imag_normed + beta_real
          # x_imag_BN = gamma_ri * x_real_normed +
          #             gamma_ii * x_imag_normed + beta_imag
  
          broadcast_gamma_rr = gamma_rr.view(gamma_broadcast_shape)
          broadcast_gamma_ri = gamma_ri.view(gamma_broadcast_shape)
          broadcast_gamma_ii = gamma_ii.view(gamma_broadcast_shape)
  
          cat_gamma_4_real = torch.cat(
              [broadcast_gamma_rr, broadcast_gamma_ii], dim=dim
          )
          cat_gamma_4_imag = torch.cat(
              [broadcast_gamma_ri, broadcast_gamma_ri], dim=dim
          )
          if dim == 0:
              centred_real = standardized_output[:input_dim]
              centred_imag = standardized_output[input_dim:]
          elif dim == 1 or (dim == -1 and ndim == 2):
              centred_real = standardized_output[:, :input_dim]
              centred_imag = standardized_output[:, input_dim:]
          elif dim == -1 and ndim == 3:
              centred_real = standardized_output[:, :, :input_dim]
              centred_imag = standardized_output[:, :, input_dim:]
          elif dim == -1 and ndim == 4:
              centred_real = standardized_output[:, :, :, :input_dim]
              centred_imag = standardized_output[:, :, :, input_dim:]
          else:
              centred_real = standardized_output[:, :, :, :, :input_dim]
              centred_imag = standardized_output[:, :, :, :, input_dim:]
  
          rolled_standardized_output = torch.cat(
              [centred_imag, centred_real], dim=dim
          )
          if center:
              broadcast_beta = beta.view(broadcast_beta_shape)
              a = cat_gamma_4_real * standardized_output
              b = cat_gamma_4_imag * rolled_standardized_output
              return a + b + broadcast_beta
          else:
              return (
                  cat_gamma_4_real * standardized_output
                  + cat_gamma_4_imag * rolled_standardized_output
              )
      else:
          if center:
              broadcast_beta = beta.view(broadcast_beta_shape)
              return input_centred + broadcast_beta
          else:
              return input_centred
  
imports: import torch
  from torch.nn import Parameter
  import numpy
  from speechbrain.nnet.complex_networks.c_ops import multi_mean
label_desc: Use image node_id 1 for calling a global function with example usage: c_norm(input_centred, Vrr, Vii, Vri, beta, gamma_rr, gamma_ri, gamma_ii, scale, center, layernorm, dim) and returns: unknown, unknown, unknown, input_centred