code: def get_imag(input, input_type="linear", channels_axis=1):
      """Returns the imaginary components of the complex-valued input.
  
      Arguments
      ---------
      input : torch.Tensor
          Input tensor.
      input_type : str,
          (convolution, linear) (default "linear")
      channels_axis : int.
          Default 1.
      """
  
      if input_type == "linear":
          nb_hidden = input.size()[-1]
          if input.dim() == 2:
              return input.narrow(
                  1, nb_hidden // 2, nb_hidden // 2
              )  # input[:, :nb_hidden / 2]
          elif input.dim() == 3:
              return input.narrow(
                  2, nb_hidden // 2, nb_hidden // 2
              )  # input[:, :, :nb_hidden / 2]
      else:
          nb_featmaps = input.size(channels_axis)
          return input.narrow(
              channels_axis, nb_featmaps // 2, nb_featmaps // 2
          )
  
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 3 for calling a global function with example usage: get_imag(input, input_type, channels_axis) and returns: input, input, input