class_docstr: Estimates an anomaly score based on 1 / p(x), where x is the data to score. The density value p(x) is estimated
  using the given density estimator. If None is given, a Gaussian mixture model is used by default.
  
  Note: The given density estimator needs to support the data types, i.e. if the data has categorical values, the
  density estimator needs to be able to handle that. The default Gaussian model can only handle numeric data.
  
  Note: If the density p(x) is 0, a nan or inf could be returned.
code: def __init__(
      self, density_estimator: Optional[DensityEstimator] = None
  ):
      if density_estimator is None:
          from dowhy.gcm.density_estimators import (
              GaussianMixtureDensityEstimator,
          )
  
          density_estimator = GaussianMixtureDensityEstimator()
      self._density_estimator = density_estimator
      self._fitted = False
  
imports: from typing import Optional
  import numpy
  from statsmodels.robust import mad
  from dowhy.gcm.anomaly_scorer import AnomalyScorer
  from dowhy.gcm.constant import EPS
  from dowhy.gcm.density_estimator import DensityEstimator
  from dowhy.gcm.util.general import shape_into_2d
label_desc: Use image node_id 1 to create a new InverseDensityScorer object from inherited base classes: AnomalyScorer with example: obj = InverseDensityScorer(density_estimator)