<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_simple_rnn(self,name, W_h, W_x, b, hidden_size, input_size, activation, input_names, output_names, output_all = False, reverse_input = False):
 """ Add a simple recurrent layer to the model. Parameters name: str The name of this layer. W_h: numpy.array Weights of the recurrent layer's hidden state. Must be of shape (hidden_size, hidden_size). W_x: numpy.array Weights of the recurrent layer's input. Must be of shape (hidden_size, input_size). b: numpy.array | None Bias of the recurrent layer's output. If None, bias is ignored. Otherwise it must be of shape (hidden_size, ). hidden_size: int Number of hidden units. This is equal to the number of channels of output shape. input_size: int Number of the number of channels of input shape. activation: str Activation function name. Can be one of the following option: ['RELU', 'TANH', 'SIGMOID', 'SCALED_TANH', 'SIGMOID_HARD', 'LINEAR']. See add_activation for more detailed description. input_names: [str] The input blob name list of this layer, in the order of [x, h_input]. output_name: [str] The output blob name list of this layer, in the order of [y, h_output]. output_all: boolean Whether the recurrent layer should output at every time step. - If False, the output is the result after the final state update. - If True, the output is a sequence, containing outputs at all time steps. reverse_input: boolean Whether the recurrent layer should process the input sequence in the reverse order. - If False, the input sequence order is not reversed. - If True, the input sequence order is reversed. See Also -------- add_activation, add_gru, add_unilstm, add_bidirlstm """


        spec = self.spec
        nn_spec = self.nn_spec

        # Add a new Layer
        spec_layer = nn_spec.layers.add()
        spec_layer.name = name
        for name in input_names:
            spec_layer.input.append(name)
        for name in output_names:
            spec_layer.output.append(name)
        spec_layer_params = spec_layer.simpleRecurrent
        spec_layer_params.reverseInput = reverse_input

        #set the parameters
        spec_layer_params.inputVectorSize = input_size
        spec_layer_params.outputVectorSize = hidden_size
        if b is not None:
            spec_layer_params.hasBiasVector = True
        spec_layer_params.sequenceOutput = output_all

        activation_f = spec_layer_params.activation
        _set_recurrent_activation(activation_f, activation)

        # Write the weights
        spec_layer_params.weightMatrix.floatValue.extend(map(float, W_x.flatten()))
        spec_layer_params.recursionMatrix.floatValue.extend(map(float, W_h.flatten()))

        if b is not None:
            spec_layer_params.biasVector.floatValue.extend(map(float, b.flatten()))