code: def eval_test(
      backcast_length,
      forecast_length,
      net,
      norm_constant,
      test_losses,
      x_test,
      y_test,
  ):
      net.eval()
      _, forecast = net(torch.tensor(x_test, dtype=torch.float))
      test_losses.append(
          F.mse_loss(
              forecast, torch.tensor(y_test, dtype=torch.float)
          ).item()
      )
      p = forecast.detach().numpy()
      subplots = [221, 222, 223, 224]
      plt.figure(1)
      for plot_id, i in enumerate(
          np.random.choice(range(len(x_test)), size=4, replace=False)
      ):
          ff, xx, yy = (
              p[i] * norm_constant,
              x_test[i] * norm_constant,
              y_test[i] * norm_constant,
          )
          plt.subplot(subplots[plot_id])
          plt.grid()
          plot_scatter(range(0, backcast_length), xx, color="b")
          plot_scatter(
              range(backcast_length, backcast_length + forecast_length),
              yy,
              color="g",
          )
          plot_scatter(
              range(backcast_length, backcast_length + forecast_length),
              ff,
              color="r",
          )
      plt.show()
  
imports: import numpy
  import pandas
  from numpy import matrix
  from scipy import linalg
  from matplotlib.pylab import rcParams
label_desc: Use image node_id 6 for calling a global function with example usage: eval_test(backcast_length, forecast_length, net, norm_constant, test_losses, x_test, y_test) without return types