class_docstr: A wrapper class for StructureScore instances, which implement a decomposable score,
  that caches local scores.
  Based on the global decomposition property of Bayesian networks for decomposable scores.
  
  Parameters
  ----------
  base_scorer: StructureScore instance
       Has to be a decomposable score.
  data: pandas DataFrame instance
      DataFrame instance where each column represents one variable.
      (If some values in the data are missing the data cells should be set to `numpy.NaN`.
      Note that pandas converts each column containing `numpy.NaN`s to dtype `float`.)
  max_size: int (optional, default 10_000)
      The maximum number of elements allowed in the cache. When the limit is reached, the least recently used
      entries will be discarded.
  **kwargs
      Additional arguments that will be handed to the super constructor.
  
  Reference
  ---------
  Koller & Friedman, Probabilistic Graphical Models - Principles and Techniques, 2009
  Section 18.3
code: def __init__(self, base_scorer, data, max_size=10000, **kwargs):
      assert isinstance(
          base_scorer, StructureScore
      ), "Base scorer has to be of type StructureScore."
  
      self.base_scorer = base_scorer
      self.cache = LRUCache(
          original_function=self._wrapped_original,
          max_size=int(max_size),
      )
      super(ScoreCache, self).__init__(data, **kwargs)
  
file_path: pgmpy/pgmpy/estimators/ScoreCache.py
imports: from pgmpy.estimators import StructureScore
label_desc: Use image node_id 1 to create a new ScoreCache object from inherited base classes: StructureScore with example: obj = ScoreCache(base_scorer, data, max_size)