class_docstr: Given an anomalous observation x and samples from the distribution of X, this score represents:
      score(x) = 1 - 2 * min[P(X > x) + P(X = x) / 2, P(X < x) + P(X = x) / 2]
  
  Comparing two NaN values are considered equal here.
  
  It scores the observation based on the quantile of x with respect to the distribution of X. Here, if the
  sample x lies in the tail of the distribution, we want to have a large score. Since we apriori don't know
  whether the sample falls on the left or right side of the median of X, we estimate the quantile on both
  sides and take the minimum. Here, these probabilities are estimated by counting and since half of the samples are
  on one side from the median, we need to multiply this by a factor of two to obtain the two-sided quantile.
  For example:
      X = [-3, -2, -1, 0, 1, 2, 3]
      x = 2.5
  Then, x falls in the right sided-quantile and only one sample in X is larger than x. Therefore, we get
      p(X >= x) = 1 / 7
      P(X <= x) = 6 / 7
  With the end score of:
     1 - 2 * min[P(X > x) + P(X = x) / 2, P(X < x) + P(X = x) / 2] = 1 - 2 / 7 = 0.71
  
  Note: For equal samples, we contribute half of the count to the left and half of the count the right side.
  
  The higher the score, the less likely the sample comes from the distribution of X.
code: def fit(self, X: np.ndarray) -> None:
      if (X.ndim == 2 and X.shape[1] > 1) or X.ndim > 2:
          raise ValueError(
              "The MedianCDFQuantileScorer currently only supports one-dimensional data!"
          )
  
      self._distribution_samples = X.reshape(-1).astype(float)
  
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 2 for calling the MedianCDFQuantileScorer obj's underlying member method code with example usage: obj.fit(X) without return types