def METHOD_NAME(q):
    """Calculates the length (euclidean norm) of a quaternion.
    Parameters
    ----------
    q : [float, float, float, float] | :class:`~compas.geometry.Quaternion`
        Quaternion or sequence of four floats ``[w, x, y, z]``.
    Returns
    -------
    float
        The length (euclidean norm) of a quaternion.
    References
    ----------
    * Quaternion Norm: http://mathworld.wolfram.com/QuaternionNorm.html
    """
    return math.sqrt(sum([x * x for x in q]))