code: def create_graph2class_gnn_model(
      hidden_state_size: int = 64, dropout_rate: float = 0.1
  ):
      def create_ggnn_mp_layers(num_edges: int):
          ggnn_mp = GatedMessagePassingLayer(
              state_dimension=hidden_state_size,
              message_dimension=hidden_state_size,
              num_edge_types=num_edges,
              message_aggregation_function="max",
              dropout_rate=dropout_rate,
          )
          r1 = ConcatResidualLayer(hidden_state_size)
          return [
              r1.pass_through_dummy_layer(),
              ggnn_mp,
              ggnn_mp,
              ggnn_mp,
              ggnn_mp,
              ggnn_mp,
              ggnn_mp,
              ggnn_mp,
              r1,
              GatedMessagePassingLayer(
                  state_dimension=2 * hidden_state_size,
                  message_dimension=hidden_state_size,
                  num_edge_types=num_edges,
                  message_aggregation_function="max",
                  dropout_rate=dropout_rate,
              ),
          ]
  
      def create_mlp_mp_layers(num_edges: int):
          mlp_mp_constructor = lambda: MlpMessagePassingLayer(
              input_state_dimension=hidden_state_size,
              message_dimension=hidden_state_size,
              output_state_dimension=hidden_state_size,
              num_edge_types=num_edges,
              message_aggregation_function="max",
              dropout_rate=0.1,
          )
          mlp_mp_after_res_constructor = lambda: MlpMessagePassingLayer(
              input_state_dimension=2 * hidden_state_size,
              message_dimension=2 * hidden_state_size,
              output_state_dimension=hidden_state_size,
              num_edge_types=num_edges,
              message_aggregation_function="max",
              dropout_rate=0.1,
          )
          r1 = ConcatResidualLayer(hidden_state_size)
          r2 = ConcatResidualLayer(hidden_state_size)
          return [
              r1.pass_through_dummy_layer(),
              mlp_mp_constructor(),
              mlp_mp_constructor(),
              mlp_mp_constructor(),
              r1,
              mlp_mp_after_res_constructor(),
              r2.pass_through_dummy_layer(),
              mlp_mp_constructor(),
              mlp_mp_constructor(),
              mlp_mp_constructor(),
              r2,
              mlp_mp_after_res_constructor(),
          ]
  
      return Graph2Class(
          gnn_model=GraphNeuralNetworkModel(
              node_representation_model=StrElementRepresentationModel(
                  embedding_size=hidden_state_size,
                  token_splitting="subtoken",
                  subtoken_combination="mean",
                  vocabulary_size=10000,
                  min_freq_threshold=5,
                  dropout_rate=dropout_rate,
              ),
              message_passing_layer_creator=create_mlp_mp_layers,
              max_nodes_per_graph=100000,
              max_graph_edges=500000,
              introduce_backwards_edges=True,
              add_self_edges=True,
              stop_extending_minibatch_after_num_nodes=120000,
              edge_dropout_rate=0.0,
          ),
          max_num_classes=100,
      )
  
file_path: ptgnn/ptgnn/implementations/typilus/train.py
imports: import logging
  import random
  import torch
  from docopt import docopt
  from dpu_utils.utils import RichPath, run_and_debug
  from pathlib import Path
  from ptgnn.baseneuralmodel import ModelTrainer
  from ptgnn.baseneuralmodel.utils.amlutils import configure_logging, log_run
  from ptgnn.baseneuralmodel.utils.data import LazyDataIterable
  from ptgnn.implementations.typilus.graph2class import Graph2Class
  from ptgnn.neuralmodels.embeddings.strelementrepresentationmodel import StrElementRepresentationModel
  from ptgnn.neuralmodels.gnn import GraphNeuralNetworkModel
  from ptgnn.neuralmodels.gnn.messagepassing import GatedMessagePassingLayer, MlpMessagePassingLayer
  from ptgnn.neuralmodels.gnn.messagepassing.residuallayers import ConcatResidualLayer
label_desc: Use image node_id 1 for calling a global function with example usage: create_graph2class_gnn_model(hidden_state_size, dropout_rate) and returns: Graph2Class, list, list