code: def __init__(self, args):
      super(HAN, self).__init__()
      self.args = args
      missing_keys = list(
          set(
              [
                  "meta_paths",
                  "num_features",
                  "num_class",
                  "out_key",
                  "num_layers",
                  "hidden",
                  "heads",
                  "dropout",
                  "act",
              ]
          )
          - set(self.args.keys())
      )
      if len(missing_keys) > 0:
          raise Exception("Missing keys: %s." % ",".join(missing_keys))
  
      act = partial(
          activation.activation_func,
          function_name=self.args.get("act", "relu"),
      )
      self.layers = nn.ModuleList()
      self.layers.append(
          HANLayer(
              self.args["meta_paths"],
              self.args["num_features"],
              self.args["hidden"][0],
              self.args["heads"][0],
              self.args["dropout"],
              act,
          )
      )
      for l in range(1, len(self.args["hidden"])):
          self.layers.append(
              HANLayer(
                  self.args["meta_paths"],
                  self.args["hidden"][l - 1]
                  * self.args["heads"][l - 1],
                  self.args["hidden"][l],
                  self.args["heads"][l],
                  self.args["dropout"],
                  act,
              )
          )
      self.predict = nn.Linear(
          self.args["hidden"][-1] * self.args["heads"][-1],
          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 dgl.nn.pytorch import GATConv
  from functools import partial
  from ..._utils import activation
  from ..None import register_model
  from .base import BaseHeteroModelMaintainer
  from .....utils import get_logger
label_desc: Use image node_id 1 to create a new HAN object from inherited base classes: nn with example: obj = HAN(args)