code: def make_data(grid, cuda=False):
      train_x = gpytorch.utils.grid.create_data_from_grid(grid)
      train_y = torch.sin(
          (train_x.sum(-1)) * (2 * math.pi)
      ) + torch.randn_like(train_x[:, 0]).mul(0.01)
      n = 20
      test_x = torch.zeros(int(pow(n, 2)), 2)
      for i in range(n):
          for j in range(n):
              test_x[i * n + j][0] = float(i) / (n - 1)
              test_x[i * n + j][1] = float(j) / (n - 1)
      test_y = torch.sin(((test_x.sum(-1)) * (2 * math.pi)))
      if cuda:
          train_x = train_x.cuda()
          train_y = train_y.cuda()
          test_x = test_x.cuda()
          test_y = test_y.cuda()
      return train_x, train_y, test_x, test_y
  
imports: import math
  import os
  import random
  import unittest
  import warnings
  import torch
  from torch import optim
  import gpytorch
  from gpytorch.test.utils import least_used_cuda_device
  from gpytorch.utils.warnings import GPInputWarning
label_desc: Use image node_id 1 for calling a global function with example usage: make_data(grid, cuda) and returns: train_x,  train_y,  test_x,  test_y