What does encoder_outputs[ei] = output[0, 0] do?

in the seq2seq tutorial…

I figure it out…can someone explain the attention code in the AttnDecoderRNN?