code: def __init__(self, args):
      super(HGT, self).__init__()
      self.args = args
      missing_keys = list(
          set(
              [
                  "features_num",
                  "num_class",
                  "num_layers",
                  "hidden",
                  "heads",
                  "dropout",
                  "act",
                  "use_norm",
                  "node_dict",
                  "edge_dict",
                  "out_key",
              ]
          )
          - set(self.args.keys())
      )
      if len(missing_keys) > 0:
          raise Exception("Missing keys: %s." % ",".join(missing_keys))
  
      self.node_dict = self.args["node_dict"]
      self.edge_dict = self.args["edge_dict"]
      self.out_key = self.args["out_key"]
      self.gcs = nn.ModuleList()
      self.num_layers = int(self.args["num_layers"])
  
      hidden = self.args["hidden"] * self.args["heads"]
  
      self.adapt_ws = nn.ModuleList()
      for t in range(len(self.node_dict)):
          self.adapt_ws.append(
              nn.Linear(self.args["features_num"], hidden)
          )
  
      for i in range(self.num_layers):
          self.gcs.append(
              HGTLayer(
                  hidden,
                  hidden,
                  self.node_dict,
                  self.edge_dict,
                  self.args["heads"],
                  use_norm=self.args["use_norm"],
                  dropout=self.args["dropout"],
              )
          )
  
      self.out = nn.Linear(hidden, self.args["num_class"])
  
imports: import logging
  import dgl
  import math
  import torch
  import torch.nn
  import torch.nn.functional
  import dgl.function
  from dgl.nn.functional import edge_softmax
  from ..None import register_model
  from .base import BaseHeteroModelMaintainer
  from ..base import activate_func
  from .....utils import get_logger
label_desc: Use image node_id 1 to create a new HGT object from inherited base classes: nn with example: obj = HGT(args)