code: def graph_node_classifier(
      name, train_data, layer_sizes=[32, 32], verbose=1
  ):
      """
      ```
      Build and return a neural node classification model.
      Notes: Only mutually-exclusive class labels are supported.
  
      Args:
          name (string): one of:
                        - 'graphsage' for GraphSAGE model
                        (only GraphSAGE currently supported)
  
          train_data (NodeSequenceWrapper): a ktrain.graph.sg_wrappers.NodeSequenceWrapper object
          verbose (boolean): verbosity of output
      Return:
          model (Model): A Keras Model instance
      ```
      """
      from .sg_wrappers import NodeSequenceWrapper
  
      # check argument
      if not isinstance(train_data, NodeSequenceWrapper):
          err = """
              train_data must be a ktrain.graph.sg_wrappers.NodeSequenceWrapper object
              """
          raise Exception(err)
      if len(layer_sizes) != 2:
          raise ValueError("layer_sizes must be of length 2")
  
      num_classes = U.nclasses_from_data(train_data)
  
      # determine multilabel
      multilabel = U.is_multilabel(train_data)
      if multilabel:
          raise ValueError(
              "Multi-label classification not currently supported for graphs."
          )
      U.vprint("Is Multi-Label? %s" % (multilabel), verbose=verbose)
  
      # set loss and activations
      loss_func = "categorical_crossentropy"
      activation = "softmax"
  
      # import stellargraph
      try:
          import stellargraph as sg
          from stellargraph.layer import GraphSAGE
      except:
          raise Exception(SG_ERRMSG)
      if version.parse(sg.__version__) < version.parse("0.8"):
          raise Exception(SG_ERRMSG)
  
      # build a GraphSAGE node classification model
      graphsage_model = GraphSAGE(
          layer_sizes=layer_sizes,
          generator=train_data,
          bias=True,
          dropout=0.5,
      )
      # x_inp, x_out = graphsage_model.default_model(flatten_output=True)
      x_inp, x_out = graphsage_model.build()
      prediction = keras.layers.Dense(
          units=num_classes, activation=activation
      )(x_out)
      model = keras.Model(inputs=x_inp, outputs=prediction)
      model.compile(
          optimizer=U.DEFAULT_OPT, loss=loss_func, metrics=["accuracy"]
      )
      U.vprint("done", verbose=verbose)
      return model
  
imports: from ..None import utils
  from ..imports import *
label_desc: Use image node_id 3 for calling a global function with example usage: graph_node_classifier(name, train_data, layer_sizes, verbose) and returns: model