code: def plot(model, X, Y, axes, cmap, N_plot=100):
      xx = np.linspace(X.min() - 1, X.max() + 1, N_plot)[:, None]
      yy = np.linspace(Y.min() - 1, Y.max() + 1, N_plot)
      pis, mus, sigmas = [v.numpy() for v in model.eval_network(xx)]
  
      probs = norm.pdf(
          yy[:, None, None],
          loc=mus[None, :, :],
          scale=sigmas[None, :, :],
      )
      probs = np.sum(probs * pis[None, :, :], axis=-1)
      plot_x, plot_y = make_grid(xx, yy)
      axes[0].set_title("Posterior density and trainings data")
      axes[0].contourf(
          plot_x, plot_y, np.log(probs), 500, cmap=cmap, vmin=-5, vmax=5
      )
      axes[0].plot(X, Y, "ro", alpha=0.2, ms=3, label="data")
      axes[0].legend(loc=4)
      axes[1].set_title(
          r"$\mu_m(x)$ and their relative contribution shown by size"
      )
      axes[1].scatter(
          np.repeat(xx.flatten(), repeats=mus.shape[1]),
          mus.flatten(),
          s=pis.flatten() * 20,
      )
  
label_desc: Use image node_id 2 for calling a global function with example usage: plot(model, X, Y, axes, cmap, N_plot) without return types