class_docstr: <a id="map_style_dataset"></a>
  
  ## Map Style Dataset
  
  This converts an [`IterableDataset`](https://pytorch.org/docs/stable/data.html#torch.utils.data.IterableDataset)
  to a [map-style dataset](https://pytorch.org/docs/stable/data.html#map-style-datasets)
  so that we can shuffle the dataset.
  
  *This only works when the dataset size is small and can be held in memory.*
docstr: Create an iterator
docstr_tok: ["Create","an","iterator"]
code: def __iter__(self):
      """Create an iterator"""
      return iter(self.data)
  
file_path: annotated_deep_learning_paper_implementations/labml_nn/utils/__init__.py
imports: import copy
  from torch.utils.data import Dataset, IterableDataset
  from labml_helpers.module import M, TypedModuleList
label_desc: Use image node_id 3 for calling the MapStyleDataset obj's underlying member method code with example usage: obj.__iter__() and returns: iter