<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_tensor_data():
 """ toy interaction data """

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

    gam = LinearGAM(te(0, 1,lam=0.1)).fit(X, y)

    XX = gam.generate_X_grid(term=0, meshgrid=True)
    Z = gam.partial_dependence(term=0, meshgrid=True)

    fig = plt.figure(figsize=(9,6))
    ax = plt.axes(projection='3d')
    ax.dist = 7.5
    ax.plot_surface(XX[0], XX[1], Z, cmap='viridis')
    ax.set_axis_off()
    fig.tight_layout()
    plt.savefig('imgs/pygam_tensor.png', transparent=True, dpi=300)