A Gallavotti–Cohen-Type Symmetry in the Large Deviation Functional for Stochastic Dynamics