Added documentation to the createMemoryDataset function.