class_docstr: Base class for loading datasets.
  
  Note that you should never instantiate the :class:`Dataset` class directly
  (same goes for its derived classes), but instead use one of the three
  available methods for loading datasets.
docstr: Load a dataset where folds (for cross-validation) are predefined by
  some files.
  
  The purpose of this method is to cover a common use case where a
  dataset is already split into predefined folds, such as the
  movielens-100k dataset which defines files u1.base, u1.test, u2.base,
  u2.test, etc... It can also be used when you don't want to perform
  cross-validation but still want to specify your training and testing
  data (which comes down to 1-fold cross-validation anyway). See an
  example in the :ref:`User Guide <load_from_folds_example>`.
  
  
  Args:
      folds_files(:obj:`iterable` of :obj:`tuples`): The list of the
          folds. A fold is a tuple of the form ``(path_to_train_file,
          path_to_test_file)``.
      reader(:obj:`Reader <surprise.reader.Reader>`): A reader to read
          the files.
docstr_tok: ["Load","a","dataset","where","folds","(","for","cross-validation",")","are","predefined","by","some","files",".","The","purpose","of","this","method","is","to","cover","a","common","use","case","where","a","dataset","is","already","split","into","predefined","folds",",","such","as","the","movielens-100k","dataset","which","defines","files","u1.base",",","u1.test",",","u2.base",",","u2.test",",","etc","...","It","can","also","be","used","when","you","do","n't","want","to","perform","cross-validation","but","still","want","to","specify","your","training","and","testing","data","(","which","comes","down","to","1-fold","cross-validation","anyway",")",".","See","an","example","in","the",":","ref",":","`","User","Guide","<","load_from_folds_example",">","`",".","Args",":","folds_files","(",":","obj",":","`","iterable","`","of",":","obj",":","`","tuples","`",")",":","The","list","of","the","folds",".","A","fold","is","a","tuple","of","the","form","``","(","path_to_train_file",",","path_to_test_file",")","``",".","reader","(",":","obj",":","`","Reader","<","surprise.reader.Reader",">","`",")",":","A","reader","to","read","the","files","."]
code: def load_from_folds(cls, folds_files, reader):
      """Load a dataset where folds (for cross-validation) are predefined by
      some files.
  
      The purpose of this method is to cover a common use case where a
      dataset is already split into predefined folds, such as the
      movielens-100k dataset which defines files u1.base, u1.test, u2.base,
      u2.test, etc... It can also be used when you don't want to perform
      cross-validation but still want to specify your training and testing
      data (which comes down to 1-fold cross-validation anyway). See an
      example in the :ref:`User Guide <load_from_folds_example>`.
  
  
      Args:
          folds_files(:obj:`iterable` of :obj:`tuples`): The list of the
              folds. A fold is a tuple of the form ``(path_to_train_file,
              path_to_test_file)``.
          reader(:obj:`Reader <surprise.reader.Reader>`): A reader to read
              the files.
  
      """
  
      return DatasetUserFolds(folds_files=folds_files, reader=reader)
  
imports: import itertools
  import os
  import sys
  from collections import defaultdict
  from .builtin_datasets import BUILTIN_DATASETS, download_builtin_dataset
  from .reader import Reader
  from .trainset import Trainset
label_desc: Use image node_id 4 for calling the Dataset obj's underlying member method code with example usage: obj.load_from_folds(cls, folds_files, reader) and returns: DatasetUserFolds