code: def _get_reducer_cls(model: str, **kwargs):
      """Get the model class by name and default kwargs.
  
      :param model: The name of the model. Can choose from: PCA, KPCA, GRP,
          SRP, TSNE, LLE, ISOMAP, MDS, or SE.
      :param kwargs: Keyword arguments that will get passed through and modified based on the chosen model.
      :return: A pair of a reducer class from :mod:`sklearn` and the modified kwargs.
  
      :raises ValueError: if invalid model name is passed
      """
      # TODO: use a class-resolver?
      if model.upper() == "PCA":
          from sklearn.decomposition import PCA as Reducer  # noqa:N811
      elif model.upper() == "KPCA":
          kwargs.setdefault("kernel", "rbf")
          from sklearn.decomposition import KernelPCA as Reducer
      elif model.upper() == "GRP":
          from sklearn.random_projection import (
              GaussianRandomProjection as Reducer,
          )
      elif model.upper() == "SRP":
          from sklearn.random_projection import (
              SparseRandomProjection as Reducer,
          )
      elif model.upper() in {"T-SNE", "TSNE"}:
          from sklearn.manifold import TSNE as Reducer  # noqa:N811
      elif model.upper() in {"LLE", "LOCALLYLINEAREMBEDDING"}:
          from sklearn.manifold import LocallyLinearEmbedding as Reducer
      elif model.upper() == "ISOMAP":
          from sklearn.manifold import Isomap as Reducer
      elif model.upper() in {"MDS", "MULTIDIMENSIONALSCALING"}:
          from sklearn.manifold import MDS as Reducer  # noqa:N811
      elif model.upper() in {"SE", "SPECTRAL", "SPECTRALEMBEDDING"}:
          from sklearn.manifold import SpectralEmbedding as Reducer
      else:
          raise ValueError(
              f"invalid dimensionality reduction model: {model}"
          )
      return Reducer, kwargs
  
file_path: pykeen/src/pykeen/pipeline/plot_utils.py
imports: import logging
  from typing import Callable, Mapping, Optional, Set
  from ..losses import loss_resolver
  from ..models.nbase import ERModel
  from ..nn.representation import Representation
  from ..stoppers import EarlyStopper
label_desc: Use image node_id 7 for calling a global function with example usage: _get_reducer_cls(model) and returns: Reducer,  kwargs