class_docstr: UMAP Mixin for automagic UMAPing
class_docstr_tok: ["UMAP","Mixin","for","automagic","UMAPing"]
docstr: Helper for setting features for memoize
docstr_tok: ["Helper","for","setting","features","for","memoize"]
code: def _set_features(  # noqa: E303
      self, res, X, y, kind, feature_engine, featurize_kwargs
  ):
      """
      Helper for setting features for memoize
      """
      kv = {}
  
      if (
          not hasattr(res, "_feature_params")
          or res._feature_params is None
      ):
          res._feature_params = {"nodes": {}, "edges": {}}
      # if we have featurized previously
      if kind in res._feature_params:
          # add in all the stuff that got stored in res._feature_params
          kv.update(res._feature_params[kind])
          # kv.pop('kind') # pop off kind, as featurization
          # doesn't use it (we have one for nodes, and one for
          # edges explicitly)
  
      if len(featurize_kwargs):
          # overwrite with anything stated in featurize_kwargs
          kv.update(featurize_kwargs)
  
      kv.update(
          {"feature_engine": resolve_feature_engine(feature_engine)}
      )
  
      # potentially overwrite with explicit mention here
      if X is not None:
          kv.update({"X": X})
  
      if y is not None:
          kv.update({"y": y})
  
      # set the features fully, and if this in memoize,
      # it will skip and just returns previous .featurize/umap
      featurize_kwargs = kv
  
      return featurize_kwargs
  
imports: import copy
  from time import time
  from typing import TYPE_CHECKING, Any, Dict, Optional, Tuple, Union
  from inspect import getmodule
  import pandas
  from .None import constants
  from .constants import CUML, UMAP_LEARN
  from .feature_utils import FeatureMixin, Literal, XSymbolic, YSymbolic, prune_weighted_edges_df_and_relabel_nodes, resolve_feature_engine
  from .PlotterBase import Plottable, WeakValueDictionary
  from .util import check_set_memoize
  import logging
label_desc: Use image node_id 10 for calling the UMAPMixin obj's underlying member method code with example usage: obj._set_features(res, X, y, kind, feature_engine, featurize_kwargs) and returns: featurize_kwargs