class_docstr: KlusterFold cross validator. Create folds based on provided cluster method
  
  Parameters
  ----------
  cluster_method : Clusterer
      Clustering method to use for the fold validation.
class_docstr_tok: ["KlusterFold","cross","validator",".","Create","folds","based","on","provided","cluster","method","Parameters","--","--","--","--","--","cluster_method",":","Clusterer","Clustering","method","to","use","for","the","fold","validation","."]
code: def __init__(self, cluster_method=None):
      if not isinstance(cluster_method, Clusterer):
          raise ValueError(
              "The KlusterFoldValidation only works on cluster methods with .fit_predict."
          )
  
      self.cluster_method = cluster_method
      self.n_splits = None
  
imports: import numbers
  from datetime import timedelta
  from itertools import combinations
  from warnings import warn
  import numpy
  import pandas
  from sklearn.exceptions import NotFittedError
  from sklearn.model_selection._split import _BaseKFold, check_array
  from sklearn.utils.validation import indexable
  from sklego.base import Clusterer
  from sklego.common import sliding_window
label_desc: Use image node_id 1 to create a new KlusterFoldValidation object  with example: obj = KlusterFoldValidation(cluster_method)