parameters: (method)
return_statement: return new_method
docstring: A wrapper that wraps a parameter checker around the original Dataset(RandomDataset).
docstring_summary: A wrapper that wraps a parameter checker around the original Dataset(RandomDataset).
docstring_tokens: A wrapper that wraps a parameter checker around the original Dataset ( RandomDataset ) .
function: def check_random_dataset(method):
      """A wrapper that wraps a parameter checker around the original Dataset(RandomDataset)."""
  
      @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', 'total_rows']
          nreq_param_bool = ['shuffle']
          nreq_param_list = ['columns_list']
  
          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)
  
          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_random_dataset ( 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' , 'total_rows' ] nreq_param_bool = [ 'shuffle' ] nreq_param_list = [ 'columns_list' ] 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 ) check_sampler_shuffle_shard_options ( param_dict ) cache = param_dict . get ( 'cache' ) check_cache_option ( cache ) return method ( self , * args , * * kwargs ) return new_method