human
Complete the below
def lstm_attention_decoder(inputs, hparams, train, name, initial_state, attn_states):

    ''''Run LSTM cell with attention on inputs of shape [batch x time x size].'
    '''

=====
What is a the Python program you requested?
assistant
#Here is the Python program you requested.
    def dropout_lstm_cell():
        return tf.contrib.rnn.DropoutWrapper(tf.nn.rnn_cell.BasicLSTMCell(hparams.hidden_size), input_keep_prob=(1.0 - (hparams.dropout * tf.to_float(train))))
    layers = [dropout_lstm_cell() for _ in range(hparams.num_hidden_layers)]
    cell = ExternalAttentionCellWrapper(tf.nn.rnn_cell.MultiRNNCell(layers), attn_states, attn_vec_size=hparams.attn_vec_size)
    initial_state = cell.combine_state(initial_state)
    with tf.variable_scope(name):
        return tf.nn.dynamic_rnn(cell, inputs, initial_state=initial_state, dtype=tf.float32, time_major=False)