<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def gen_multi_data(n=5000):
 """ multivariate Logistic problem """

    X, y = toy_classification(return_X_y=True, n=10000)

    lgam = LogisticGAM(s(0) + s(1) + s(2) + s(3) + s(4) + f(5))
    lgam.fit(X, y)

    plt.figure()
    for i, term in enumerate(lgam.terms):
        if term.isintercept:
            continue
        plt.plot(lgam.partial_dependence(term=i))

    plt.savefig('imgs/pygam_multi_pdep.png', dpi=300)

    plt.figure()
    plt.plot(lgam.logs_['deviance'])
    plt.savefig('imgs/pygam_multi_deviance.png', dpi=300)