class_docstr: ```
  Node preprocessing base class
  ```
class_docstr_tok: ["``","`","Node","preprocessing","base","class","``","`"]
code: def __init__(
      self, G_nx, df, sample_size=10, missing_label_value=None
  ):
      self.sampsize = sample_size  # neighbor sample size
      self.df = df  # node attributes and targets
      # TODO: eliminate storage redundancy
      self.G = G_nx  # networkx graph
      self.G_sg = None  # StellarGraph
  
      # clean df
      df.index = df.index.map(str)
      df = df[df.index.isin(list(self.G.nodes()))]
  
      # class names
      self.c = list(set([c[0] for c in df[["target"]].values]))
      if missing_label_value is not None:
          self.c.remove(missing_label_value)
      self.c.sort()
  
      # feature names + target
      self.colnames = list(df.columns.values)
      if self.colnames[-1] != "target":
          raise ValueError('last column of df must be "target"')
  
      # set by preprocess_train
      self.y_encoding = None
  
imports: from ..None import utils
  from ..imports import *
  from ..preprocessor import Preprocessor
label_desc: Use image node_id 1 to create a new NodePreprocessor object from inherited base classes: Preprocessor with example: obj = NodePreprocessor(G_nx, df, sample_size, missing_label_value)