class_docstr: The Nearest Neighbor (NN) Contrastive algorithm uses an auto-encoder to train low dimensional
  representation for each data point, for the nearest neighbor search. The dimensional reduction improves
  the reliability of the neighborhood search. Along with dimensionality reduction, the
  current implementation also allows for imposing class structure-driven orientation of the
  embedding space. For example, in a loan application, a high-income applicant and a
  low-income applicant may have very different evaluation criteria. The auto-encoder uses
  high-income and low-income tag classes during the auto-encoder training, ensuring
  instances with the same tags are in close neighborhoods.
  
  The implementation allows exemplar selection in two ways, (1) contrastive exemplar
  selection is guided by a model prediction, and (2) the user explicitly provides an
  exemplar with a different class tag than the query instance (model-free). Given a query
  instance, the resulting explanation is a set of nearest neighbor exemplars with different
  class tags than the query instances.
code: def n_classes(self) -> int:
      return self._config.get("n_classes")
  
imports: from enum import Enum
  from typing import List, Union, Callable
  import numpy
  import pandas
  from sklearn.neighbors import KDTree
  from aix360.algorithms.lbbe import LocalBBExplainer
  from aix360.algorithms.nncontrastive.embedding import AEEmbedding, JointAEEmbedding
label_desc: Use image node_id 5 for calling the NearestNeighborContrastiveExplainer obj's underlying member method code with example usage: obj.n_classes() and returns: self