Thermalization of electron-positron-photon plasmas with an application to GRB