human
Can you provide a the Python program you requested given the following:
Complete the below
def dropout(incoming, keep_prob, noise_shape=None, name='Dropout'):

    ''''Dropout.
    Outputs the input element scaled up by `1 / keep_prob`. The scaling is so
    that the expected sum is unchanged.
    By default, each element is kept or dropped independently. If noise_shape
    is specified, it must be broadcastable to the shape of x, and only dimensions
    with noise_shape[i] == shape(x)[i] will make independent decisions. For
    example, if shape(x) = [k, l, m, n] and noise_shape = [k, 1, 1, n], each
    batch and channel component will be kept independently and each row and column
    will be kept or not kept together.
    Arguments:
    incoming : A `Tensor`. The incoming tensor.
    keep_prob : A float representing the probability that each element
    is kept.
    noise_shape : A 1-D Tensor of type int32, representing the shape for
    randomly generated keep/drop flags.
    name : A name for this layer (optional).
    References:
    Dropout: A Simple Way to Prevent Neural Networks from Overfitting.
    N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever & R. Salakhutdinov,
    (2014), Journal of Machine Learning Research, 5(Jun)(2), 1929-1958.
    Links:
    [https://www.cs.toronto.edu/~hinton/absps/JMLRdropout.pdf]
    (https://www.cs.toronto.edu/~hinton/absps/JMLRdropout.pdf)'
    '''
assistant
#Here is the Python program you requested.
    with tf.name_scope(name) as scope:
        inference = incoming
        def apply_dropout():
            if (type(inference) in [list, np.array]):
                for x in inference:
                    x = tf.nn.dropout(x, keep_prob, noise_shape)
                return inference
            else:
                return tf.nn.dropout(inference, keep_prob, noise_shape)
        is_training = tflearn.get_training_mode()
        inference = tf.cond(is_training, apply_dropout, (lambda : inference))
    tf.add_to_collection(((tf.GraphKeys.LAYER_TENSOR + '/') + name), inference)
    return inference