code: def __init__(
      self,
      num_features: int,
      num_classes: int,
      hidden_features: _typing.Sequence[int],
      activation_name: str,
      layers_dropout: _typing.Union[
          _typing.Optional[float],
          _typing.Sequence[_typing.Optional[float]],
      ] = None,
      aggr: str = "mean",
  ):
      super().__init__()
      if not type(num_features) == type(num_classes) == int:
          raise TypeError
      if not isinstance(hidden_features, _typing.Sequence):
          raise TypeError
      for hidden_feature in hidden_features:
          if type(hidden_feature) != int:
              raise TypeError
          elif hidden_feature <= 0:
              raise ValueError
      if isinstance(layers_dropout, _typing.Sequence):
          if len(layers_dropout) != (len(hidden_features) + 1):
              raise TypeError
          for d in layers_dropout:
              if d is not None and type(d) != float:
                  raise TypeError
          _layers_dropout: _typing.Sequence[
              _typing.Optional[float]
          ] = layers_dropout
      elif layers_dropout is None or type(layers_dropout) == float:
          _layers_dropout: _typing.Sequence[_typing.Optional[float]] = [
              layers_dropout for _ in range(len(hidden_features))
          ] + [None]
      else:
          raise TypeError
      if not type(activation_name) == type(aggr) == str:
          raise TypeError
      if aggr not in ("add", "max", "mean"):
          aggr = "mean"
  
      if len(hidden_features) == 0:
          self.__sequential_encoding_layers: torch.nn.ModuleList = (
              torch.nn.ModuleList(
                  [
                      self._SAGELayer(
                          num_features,
                          num_classes,
                          aggr,
                          activation_name,
                          _layers_dropout[0],
                      )
                  ]
              )
          )
      else:
          self.__sequential_encoding_layers: torch.nn.ModuleList = (
              torch.nn.ModuleList(
                  [
                      self._SAGELayer(
                          num_features,
                          hidden_features[0],
                          aggr,
                          activation_name,
                          _layers_dropout[0],
                      )
                  ]
              )
          )
          for i in range(len(hidden_features)):
              if i + 1 < len(hidden_features):
                  self.__sequential_encoding_layers.append(
                      self._SAGELayer(
                          hidden_features[i],
                          hidden_features[i + 1],
                          aggr,
                          activation_name,
                          _layers_dropout[i + 1],
                      )
                  )
              else:
                  self.__sequential_encoding_layers.append(
                      self._SAGELayer(
                          hidden_features[i],
                          num_classes,
                          aggr,
                          _layers_dropout[i + 1],
                      )
                  )
  
imports: import torch
  import typing
  from torch_geometric.nn.conv import SAGEConv
  import torch.nn.functional
  import autogl.data
  from .None import register_model
  from .base import BaseAutoModel, activate_func, ClassificationSupportedSequentialModel
  from ....utils import get_logger
label_desc: Use image node_id 1 to create a new GraphSAGE object from inherited base classes: ClassificationSupportedSequentialModel with example: obj = GraphSAGE(num_features, num_classes, hidden_features, activation_name, layers_dropout, aggr)