code: def check_quaternion_input(input_shape):
      """Check the quaternion-valued shape for a linear layer.
  
      Arguments
      ---------
      input_shape : tuple
          Expected shape of the input.
      """
  
      if len(input_shape) not in {1, 2, 3}:
          raise Exception(
              "Quaternion linear accepts only input of dimension 2 or 3."
              " input.dim = " + str(input.dim())
          )
  
      nb_hidden = input_shape[-1]
  
      if nb_hidden % 4 != 0:
          raise Exception(
              "Quaternion Tensors must have dimensions divisible by 4."
              " input.size()[1] = " + str(nb_hidden)
          )
  
file_path: speechbrain/speechbrain/nnet/quaternion_networks/q_ops.py
imports: import torch
  import math
  import numpy
  import torch.nn.functional
  from scipy.stats import chi
  from torch.autograd import Variable
label_desc: Use image node_id 9 for calling a global function with example usage: check_quaternion_input(input_shape) without return types