Two-stage EDFA design with GFF and bidirectional pump bypass