Topological string on elliptic Calabi--Yau $3$-folds with $N$-sections and modular forms