def METHOD_NAME(n_samples, log_f, dx, seed_val):
    np.random.seed(seed_val)
    # Generates data with a simple markov chain
    x = np.empty(n_samples)
    x_old = np.random.normal()
    for i in range(n_samples):
        x_new = x_old + np.random.normal(scale=dx, loc=0.0)
        if np.exp(log_f(x_new) - log_f(x_old)) > np.random.uniform(0, 1):
            x[i] = x_new
        else:
            x[i] = x_old
        x_old = x[i]
    return x