what will happen if I will not extend the Dataset(I know this is an abstract class ) but what is the usefulness of this extending?
import numpy as np
from torch.utils.data import Dataset
 
class ExampleDataset(Dataset):
    def __init__(self, data):
        self.data = data
 
    def __len__(self):
        return len(self.data)
    
    def __getitem__(self, idx):
        return self.data[idx]


sample_data = np.arange(0, 10)
print('The whole data: ', sample_data)
dataset = ExampleDataset(sample_data)
print('Number of samples in the data: ', len(dataset))
print(dataset[2])
print(dataset[0:5])