code: def __call__(self, func):
      @wraps(func)
      def inner(*args, **kwargs):
          # If true, will use MVTech AD dataset for testing.
          # Useful for nightly builds
          if self.use_mvtec:
              return func(*args, path=self.path, **kwargs)
          else:
              with GeneratedDummyDataset(
                  num_train=self.num_train,
                  num_test=self.num_test,
                  img_height=self.img_height,
                  img_width=self.img_width,
                  train_shapes=self.train_shapes,
                  test_shapes=self.test_shapes,
                  max_size=self.max_size,
                  seed=self.seed,
              ) as dataset_path:
                  kwargs["category"] = "shapes"
                  return func(*args, path=dataset_path, **kwargs)
  
      return inner
  
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 2 for calling the TestDataset obj's underlying member method code with example usage: obj.__call__(func) and returns: inner, func, func