1# Module to import functions from in examples for multiprocessing backend
2import numpy as np
3
4
5def obj_fun(x, noise_level=0.1):
6    return np.sin(5 * x[0]) * (1 - np.tanh(x[0] ** 2)) +\
7           np.random.randn() * noise_level
8