class_docstr: Context for generating dummy shapes dataset.
  Example:
      >>> with GeneratedDummyDataset(num_train=1000,num_test=100) as dataset_path:
      >>>     some_function()
  
      Args:
          num_train (int, optional): Number of training images to generate. Defaults to 1000.
          num_test (int, optional): Number of testing images to generate per category. Defaults to 100.
          img_height (int, optional): Height of the image. Defaults to 128.
          img_width (int, optional): Width of the image. Defaults to 128.
          max_size (Optional[int], optional): Maximum size of the test shapes. Defaults to 10.
          train_shapes (List[str], optional): List of good shapes. Defaults to ["circle", "rectangle"].
          test_shapes (List[str], optional): List of anomalous shapes. Defaults to ["triangle", "ellipse"].
          seed (int, optional): Fixes seed if any number greater than 0 is provided. 0 means no seed. Defaults to 0.
class_docstr_tok: ["Context","for","generating","dummy","shapes","dataset",".","Example",":",">",">",">","with","GeneratedDummyDataset","(","num_train=1000",",","num_test=100",")","as","dataset_path",":",">",">",">","some_function","(",")","Args",":","num_train","(","int",",","optional",")",":","Number","of","training","images","to","generate",".","Defaults","to","1000.","num_test","(","int",",","optional",")",":","Number","of","testing","images","to","generate","per","category",".","Defaults","to","100.","img_height","(","int",",","optional",")",":","Height","of","the","image",".","Defaults","to","128.","img_width","(","int",",","optional",")",":","Width","of","the","image",".","Defaults","to","128.","max_size","(","Optional","[","int","]",",","optional",")",":","Maximum","size","of","the","test","shapes",".","Defaults","to","10.","train_shapes","(","List","[","str","]",",","optional",")",":","List","of","good","shapes",".","Defaults","to","[","``","circle","''",",","``","rectangle","''","]",".","test_shapes","(","List","[","str","]",",","optional",")",":","List","of","anomalous","shapes",".","Defaults","to","[","``","triangle","''",",","``","ellipse","''","]",".","seed","(","int",",","optional",")",":","Fixes","seed","if","any","number","greater","than","0","is","provided",".","0","means","no","seed",".","Defaults","to","0","."]
docstr: Creates the dataset in temp folder.
docstr_tok: ["Creates","the","dataset","in","temp","folder","."]
code: def __enter__(self):
      """Creates the dataset in temp folder."""
      if self.seed:
          np.random.seed(self.seed)
      self._generate_dataset()
      return self.root_dir
  
imports: import os
  import shutil
  from contextlib import ContextDecorator
  from functools import wraps
  from pathlib import Path
  from tempfile import mkdtemp
  from typing import Dict, List, Optional, Union
  import numpy
  from skimage.io import imsave
  from .shapes import random_shapes
label_desc: Use image node_id 3 for calling the GeneratedDummyDataset obj's underlying member method code with example usage: obj.__enter__() and returns: self