'Based on decoder connections, prepare the list of final states for decoder'

def get_final_states(self, decoder_cons):

    final_states = [(self._recurrent[ii].final_state() if (ii is not None) else None) for ii in decoder_cons]
    return final_states
