code: def gen_RandomDataset():
      import torch
      from torch.utils.data import Dataset
  
      class RandomDataset(Dataset):
          def __init__(self, size=1000):
              x, y = get_x_y(size)
              self.x = torch.from_numpy(x).float()
              self.y = torch.from_numpy(y).float()
  
          def __len__(self):
              return self.x.shape[0]
  
          def __getitem__(self, idx):
              return self.x[idx], self.y[idx]
  
      return RandomDataset
  
imports: from bigdl.chronos.utils import LazyImport
  import numpy
  from unittest import TestCase
  import pytest
  import tempfile
  from ...None import op_torch, op_tf2, op_distributed, op_inference
label_desc: Use image node_id 2 for calling a global function with example usage: gen_RandomDataset() and returns: RandomDataset, self, self,  self