Which of the following is the solution to the differential equation $\frac { d y } { d x } = 2 \sin x$ with the initial condition $y ( \pi ) = 1$ ?
(A) $y = 2 \cos x + 3$
(B) $y = 2 \cos x - 1$
(C) $y = - 2 \cos x + 3$
(D) $y = - 2 \cos x + 1$
(E) $y = - 2 \cos x - 1$