parameters: (method)
return_statement: return new_method
docstring: A wrapper that wraps a parameter checker around the original Dataset(ImageFolderDataset).
docstring_summary: A wrapper that wraps a parameter checker around the original Dataset(ImageFolderDataset).
docstring_tokens: A wrapper that wraps a parameter checker around the original Dataset ( ImageFolderDataset ) .
function: def check_imagefolderdataset(method):
      """A wrapper that wraps a parameter checker around the original Dataset(ImageFolderDataset)."""
  
      @wraps(method)
      def new_method(self, *args, **kwargs):
          _, param_dict = parse_user_args(method, *args, **kwargs)
  
          nreq_param_int = ['num_samples', 'num_parallel_workers', 'num_shards', 'shard_id']
          nreq_param_bool = ['shuffle', 'decode']
          nreq_param_list = ['extensions']
          nreq_param_dict = ['class_indexing']
  
          dataset_dir = param_dict.get('dataset_dir')
          check_dir(dataset_dir)
  
          validate_dataset_param_value(nreq_param_int, param_dict, int)
          validate_dataset_param_value(nreq_param_bool, param_dict, bool)
          validate_dataset_param_value(nreq_param_list, param_dict, list)
          validate_dataset_param_value(nreq_param_dict, param_dict, dict)
          check_sampler_shuffle_shard_options(param_dict)
  
          cache = param_dict.get('cache')
          check_cache_option(cache)
  
          return method(self, *args, **kwargs)
  
      return new_method
function_tokens: def check_imagefolderdataset ( method ) : @ wraps ( method ) def new_method ( self , * args , * * kwargs ) : _ , param_dict = parse_user_args ( method , * args , * * kwargs ) nreq_param_int = [ 'num_samples' , 'num_parallel_workers' , 'num_shards' , 'shard_id' ] nreq_param_bool = [ 'shuffle' , 'decode' ] nreq_param_list = [ 'extensions' ] nreq_param_dict = [ 'class_indexing' ] dataset_dir = param_dict . get ( 'dataset_dir' ) check_dir ( dataset_dir ) validate_dataset_param_value ( nreq_param_int , param_dict , int ) validate_dataset_param_value ( nreq_param_bool , param_dict , bool ) validate_dataset_param_value ( nreq_param_list , param_dict , list ) validate_dataset_param_value ( nreq_param_dict , param_dict , dict ) check_sampler_shuffle_shard_options ( param_dict ) cache = param_dict . get ( 'cache' ) check_cache_option ( cache ) return method ( self , * args , * * kwargs ) return new_method