code: def norm(q):
      """Return norm of quaternion
  
      Parameters
      ----------
      q : 4 element sequence
         w, i, j, k of quaternion
  
      Returns
      -------
      n : scalar
         quaternion norm
      """
      return np.dot(q, q)
  
file_path: nibabel/nibabel/quaternions.py
imports: import math
  import numpy
  from .casting import sctypes
label_desc: Use image node_id 6 for calling a global function with example usage: norm(q) and returns: np