"""Computes a single quaternion representing the rotation that best aligns one set of 3D vectors to another.

This function calculates the optimal rotation that aligns the vectors in `vec_set1` to the corresponding vectors in `vec_set2`. The rotation is represented as a normalized quaternion.

Args:
    vec_set1 (np.array): A (N, 3) array of N 3D vectors to be aligned.
    vec_set2 (np.array): A (N, 3) array of N 3D vectors to align `vec_set1` to.

Returns:
    np.array: A (4,) normalized quaternion representing the overall rotation that best aligns `vec_set1` to `vec_set2`.
"""