def _transform_spherical_displacement(inode, data, coord, xyz_cid0,
    cid_transform, is_global_cid):
    """helper method for transform_displacement_to_global"""
    xyzi = xyz_cid0[(inode), :]
    for itime in range(data.shape[0]):
        translation = data[(itime), (inode), :3]
        rotation = data[(itime), (inode), 3:]
        translation = coord.coord_to_xyz_array(translation)
        rotation = coord.coord_to_xyz_array(rotation)
        if is_global_cid:
            data[(itime), (inode), :3] = translation
            data[(itime), (inode), 3:] = rotation
            return
        data[(itime), (inode), :3] = translation.dot(cid_transform)
        data[(itime), (inode), 3:] = rotation.dot(cid_transform)
