<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def activation(self, x, f="sigmoid", der=False):
 """ This function process values of layer outputs with activation function. **Args:** * `x` : array to process (1-dimensional array) **Kwargs:** * `f` : activation function * `der` : normal output, or its derivation (bool) **Returns:** * values processed with activation function (1-dimensional array) """

        if f == "sigmoid":
            if der:
                return x * (1 - x)
            return 1. / (1 + np.exp(-x))
        elif f == "tanh":
            if der:
                return 1 - x**2 
            return (2. / (1 + np.exp(-2*x))) - 1