class_docstr: Auto Multi-class Graph Node Classifier.
  
  Used to automatically solve the node classification problems.
  
  Parameters
  ----------
  feature_module: autogl.module.feature.BaseFeatureEngineer or str or None
      The (name of) auto feature engineer used to process the given dataset. Default ``deepgl``.
      Disable feature engineer by setting it to ``None``.
  
  graph_models: Sequence of models
      Models can be ``str``, ``autogl.module.model.BaseAutoModel``, 
      ``autogl.module.model.encoders.BaseEncoderMaintainer`` or a tuple of (encoder, decoder) 
      if need to specify both encoder and decoder. Encoder can be ``str`` or
      ``autogl.module.model.encoders.BaseEncoderMaintainer``, and decoder can be ``str``
      or ``autogl.module.model.decoders.BaseDecoderMaintainer``.
  
  nas_algorithms: (list of) autogl.module.nas.algorithm.BaseNAS or str (Optional)
      The (name of) nas algorithms used. Default ``None``.
  
  nas_spaces: (list of) autogl.module.nas.space.BaseSpace or str (Optional)
      The (name of) nas spaces used. Default ``None``.
  
  nas_estimators: (list of) autogl.module.nas.estimator.BaseEstimator or str (Optional)
      The (name of) nas estimators used. Default ``None``.
  
  hpo_module: autogl.module.hpo.BaseHPOptimizer or str or None
      The (name of) hpo module used to search for best hyper parameters. Default ``anneal``.
      Disable hpo by setting it to ``None``.
  
  ensemble_module: autogl.module.ensemble.BaseEnsembler or str or None
      The (name of) ensemble module used to ensemble the multi-models found. Default ``voting``.
      Disable ensemble by setting it to ``None``.
  
  max_evals: int (Optional)
      If given, will set the number eval times the hpo module will use.
      Only be effective when hpo_module is ``str``. Default ``None``.
  
  default_trainer: str (Optional)
      The (name of) the trainer used in this solver. Default to ``NodeClassificationFull``.
  
  trainer_hp_space: list of dict (Optional)
      trainer hp space or list of trainer hp spaces configuration.
      If a single trainer hp is given, will specify the hp space of trainer for every model.
      If a list of trainer hp is given, will specify every model with corrsponding
      trainer hp space.
      Default ``None``.
  
  model_hp_spaces: list of list of dict (Optional)
      model hp space configuration.
      If given, will specify every hp space of every passed model. Default ``None``.
      If the encoder(-decoder) is passed, the space should be a dict containing keys "encoder"
      and "decoder", specifying the detailed encoder decoder hp spaces.
  
  size: int (Optional)
      The max models ensemble module will use. Default ``None``.
  
  device: torch.device or str
      The device where model will be running on. If set to ``auto``, will use gpu when available.
      You can also specify the device by directly giving ``gpu`` or ``cuda:0``, etc.
      Default ``auto``.
class_docstr_tok: ["Auto","Multi-class","Graph","Node","Classifier",".","Used","to","automatically","solve","the","node","classification","problems",".","Parameters","--","--","--","--","--","feature_module",":","autogl.module.feature.BaseFeatureEngineer","or","str","or","None","The","(","name","of",")","auto","feature","engineer","used","to","process","the","given","dataset",".","Default","``","deepgl","``",".","Disable","feature","engineer","by","setting","it","to","``","None","``",".","graph_models",":","Sequence","of","models","Models","can","be","``","str","``",",","``","autogl.module.model.BaseAutoModel","``",",","``","autogl.module.model.encoders.BaseEncoderMaintainer","``","or","a","tuple","of","(","encoder",",","decoder",")","if","need","to","specify","both","encoder","and","decoder",".","Encoder","can","be","``","str","``","or","``","autogl.module.model.encoders.BaseEncoderMaintainer","``",",","and","decoder","can","be","``","str","``","or","``","autogl.module.model.decoders.BaseDecoderMaintainer","``",".","nas_algorithms",":","(","list","of",")","autogl.module.nas.algorithm.BaseNAS","or","str","(","Optional",")","The","(","name","of",")","nas","algorithms","used",".","Default","``","None","``",".","nas_spaces",":","(","list","of",")","autogl.module.nas.space.BaseSpace","or","str","(","Optional",")","The","(","name","of",")","nas","spaces","used",".","Default","``","None","``",".","nas_estimators",":","(","list","of",")","autogl.module.nas.estimator.BaseEstimator","or","str","(","Optional",")","The","(","name","of",")","nas","estimators","used",".","Default","``","None","``",".","hpo_module",":","autogl.module.hpo.BaseHPOptimizer","or","str","or","None","The","(","name","of",")","hpo","module","used","to","search","for","best","hyper","parameters",".","Default","``","anneal","``",".","Disable","hpo","by","setting","it","to","``","None","``",".","ensemble_module",":","autogl.module.ensemble.BaseEnsembler","or","str","or","None","The","(","name","of",")","ensemble","module","used","to","ensemble","the","multi-models","found",".","Default","``","voting","``",".","Disable","ensemble","by","setting","it","to","``","None","``",".","max_evals",":","int","(","Optional",")","If","given",",","will","set","the","number","eval","times","the","hpo","module","will","use",".","Only","be","effective","when","hpo_module","is","``","str","``",".","Default","``","None","``",".","default_trainer",":","str","(","Optional",")","The","(","name","of",")","the","trainer","used","in","this","solver",".","Default","to","``","NodeClassificationFull","``",".","trainer_hp_space",":","list","of","dict","(","Optional",")","trainer","hp","space","or","list","of","trainer","hp","spaces","configuration",".","If","a","single","trainer","hp","is","given",",","will","specify","the","hp","space","of","trainer","for","every","model",".","If","a","list","of","trainer","hp","is","given",",","will","specify","every","model","with","corrsponding","trainer","hp","space",".","Default","``","None","``",".","model_hp_spaces",":","list","of","list","of","dict","(","Optional",")","model","hp","space","configuration",".","If","given",",","will","specify","every","hp","space","of","every","passed","model",".","Default","``","None","``",".","If","the","encoder","(","-decoder",")","is","passed",",","the","space","should","be","a","dict","containing","keys","``","encoder","''","and","``","decoder","''",",","specifying","the","detailed","encoder","decoder","hp","spaces",".","size",":","int","(","Optional",")","The","max","models","ensemble","module","will","use",".","Default","``","None","``",".","device",":","torch.device","or","str","The","device","where","model","will","be","running","on",".","If","set","to","``","auto","``",",","will","use","gpu","when","available",".","You","can","also","specify","the","device","by","directly","giving","``","gpu","``","or","``","cuda:0","``",",","etc",".","Default","``","auto","``","."]
code: def _init_graph_module(
      self, graph_models, num_classes, num_features, feval, device, loss
  ) -> "AutoNodeClassifier":
      # load graph network module
      self.graph_model_list = []
  
      for i, model in enumerate(graph_models):
          # init the trainer
          if not isinstance(model, BaseNodeClassificationTrainer):
              trainer = (
                  self._default_trainer
                  if not isinstance(
                      self._default_trainer, (tuple, list)
                  )
                  else self._default_trainer[i]
              )
              if isinstance(trainer, str):
                  if trainer not in TRAINER_DICT:
                      raise KeyError(
                          f"Does not support trainer {trainer}"
                      )
                  trainer = TRAINER_DICT[trainer]()
              if isinstance(model, (tuple, list)):
                  trainer.encoder = model[0]
                  trainer.decoder = model[1]
              else:
                  trainer.encoder = model
          else:
              trainer = model
  
          # set model hp space
          if self._model_hp_spaces is not None:
              if self._model_hp_spaces[i] is not None:
                  if isinstance(self._model_hp_spaces[i], dict):
                      encoder_hp_space = self._model_hp_spaces[i].get(
                          "encoder", None
                      )
                      decoder_hp_space = self._model_hp_spaces[i].get(
                          "decoder", None
                      )
                  else:
                      encoder_hp_space = self._model_hp_spaces[i]
                      decoder_hp_space = None
                  if encoder_hp_space is not None:
                      trainer.encoder.hyper_parameter_space = (
                          encoder_hp_space
                      )
                  if decoder_hp_space is not None:
                      trainer.decoder.hyper_parameter_space = (
                          decoder_hp_space
                      )
  
          # set trainer hp space
          if self._trainer_hp_space is not None:
              if isinstance(self._trainer_hp_space[0], list):
                  current_hp_for_trainer = self._trainer_hp_space[i]
              else:
                  current_hp_for_trainer = self._trainer_hp_space
              trainer.hyper_parameter_space = current_hp_for_trainer
  
          trainer.num_features = num_features
          trainer.num_classes = num_classes
          trainer.loss = loss
          trainer.feval = feval
          trainer.to(device)
          self.graph_model_list.append(trainer)
  
      return self
  
imports: import time
  import json
  from copy import deepcopy
  from typing import Sequence
  import torch
  import numpy
  import yaml
  from .base import BaseClassifier
  from ..base import _parse_hp_space, _initialize_single_model, _parse_model_hp
  from ...module.feature import FEATURE_DICT
  from ...module.train import TRAINER_DICT, BaseNodeClassificationTrainer
  from ...module.train import get_feval
  from ...module.nas.space import NAS_SPACE_DICT
  from ...module.nas.algorithm import NAS_ALGO_DICT
  from ...module.nas.estimator import NAS_ESTIMATOR_DICT, BaseEstimator
  from ..utils import LeaderBoard, get_graph_from_dataset, get_graph_labels, get_graph_masks, get_graph_node_features, get_graph_node_number, set_seed
  from ...datasets import utils
  from ...utils import get_logger
label_desc: Use image node_id 2 for calling the AutoNodeClassifier obj's underlying member method code with example usage: obj._init_graph_module(graph_models, num_classes, num_features, feval, device, loss) and returns: self