class_docstr: Automagic DGL models from Graphistry Instances.
class_docstr_tok: ["Automagic","DGL","models","from","Graphistry","Instances","."]
code: def _featurize_nodes_to_dgl(
      self,
      res,
      feature_engine: FeatureEngine = "auto",
      *args,
      **kwargs,
  ):
      logger.info("Running Node Featurization for DGL Graph")
      # logger.debug(f"=*=*=Input shapes are data: {X.shape}, target: {y.shape}")
  
      (
          X_enc,
          y_enc,
          res,
      ) = res._featurize_or_get_nodes_dataframe_if_X_is_None(
          feature_engine=resolve_feature_engine(feature_engine),
          *args,
          **kwargs,
      )
  
      logger.debug(
          f"=*=*=Encoded Node shapes are data: {X_enc.shape}, target: {y_enc.shape}"
      )
  
      ndata = convert_to_torch(X_enc, y_enc)
      # add ndata to the graph
      res._dgl_graph.ndata.update(ndata)
      res._mask_nodes()
      return res
  
imports: from collections import Counter
  from typing import Dict, Optional, TYPE_CHECKING, Tuple
  import numpy
  import pandas
  from .None import constants
  from .feature_utils import FeatureEngine, FeatureMixin, resolve_feature_engine, XSymbolic, YSymbolic, resolve_X, resolve_y
  from .util import setup_logger
label_desc: Use image node_id 7 for calling the DGLGraphMixin obj's underlying member method code with example usage: obj._featurize_nodes_to_dgl(res, feature_engine) and returns: res