docstr: :param node_representation_model: A model that can convert the data of each node into their
      tensor representation and create the neural network that computes the node representations.
  :param message_passing_layer_creator: A function that accepts the number of edge types and creates
      a list of `AbstractMessagePassingLayer` layers to be used by the GNN.
docstr_tok: [":","param","node_representation_model",":","A","model","that","can","convert","the","data","of","each","node","into","their","tensor","representation","and","create","the","neural","network","that","computes","the","node","representations",".",":","param","message_passing_layer_creator",":","A","function","that","accepts","the","number","of","edge","types","and","creates","a","list","of","`","AbstractMessagePassingLayer","`","layers","to","be","used","by","the","GNN","."]
code: def __init__(
      self,
      *,
      node_representation_model: AbstractNeuralModel[
          TNodeData, TTensorizedNodeData, nn.Module
      ],
      message_passing_layer_creator: Callable[
          [int], List[AbstractMessagePassingLayer]
      ],
      max_nodes_per_graph: int = 80000,
      max_graph_edges: int = 100000,
      introduce_backwards_edges: bool = True,
      stop_extending_minibatch_after_num_nodes: int = 10000,
      add_self_edges: bool = False,
      edge_dropout_rate: float = 0.0,
      edge_representation_model: Optional[
          AbstractNeuralModel[TEdgeData, TTensorizedEdgeData, nn.Module]
      ] = None,
  ):
      """
      :param node_representation_model: A model that can convert the data of each node into their
          tensor representation and create the neural network that computes the node representations.
      :param message_passing_layer_creator: A function that accepts the number of edge types and creates
          a list of `AbstractMessagePassingLayer` layers to be used by the GNN.
      """
      super().__init__()
      self.__message_passing_layers_creator: Final = (
          message_passing_layer_creator
      )
      self.__node_embedding_model: Final = node_representation_model
      self.__edge_embedding_model: Final = edge_representation_model
      self.max_nodes_per_graph: Final = max_nodes_per_graph
      self.max_graph_edges: Final = max_graph_edges
      self.introduce_backwards_edges: Final = introduce_backwards_edges
      self.stop_extending_minibatch_after_num_nodes: Final = (
          stop_extending_minibatch_after_num_nodes
      )
      self.add_self_edges: Final = add_self_edges
      self.__edge_dropout_rate = edge_dropout_rate
  
imports: from typing_extensions import Final
  import logging
  import numpy
  import torch
  from collections import defaultdict
  from torch import nn
  from typing import Any, Callable, Dict, Iterable, Iterator, List, Optional, Set, Tuple, TypeVar, Union
  from ptgnn.baseneuralmodel import AbstractNeuralModel, ModuleWithMetrics
  from ptgnn.baseneuralmodel.utils.data import enforce_not_None
  from ptgnn.neuralmodels.gnn.messagepassing.abstractmessagepassing import AbstractMessagePassingLayer
  from ptgnn.neuralmodels.gnn.structs import GnnOutput, GraphData, TensorizedGraphData
label_desc: Use image node_id 1 to create a new GraphNeuralNetworkModel object from inherited base classes: AbstractNeuralModel with example: obj = GraphNeuralNetworkModel()