code: def forward(
      self, graph: dgl.DGLGraph, *__args, **__kwargs
  ) -> _typing.Iterable[torch.Tensor]:
      num_layers = len(self.__convolutions)
      if "feat" in graph.ndata:
          x: torch.Tensor = graph.ndata["feat"]
      else:
          x: torch.Tensor = graph.ndata["attr"]
      results = [x]
      for layer in range(num_layers):
          if layer < num_layers - 1 or self.__concat_last:
              x = self.__convolutions[layer](graph, x).flatten(1)
          else:
              x = self.__convolutions[layer](graph, x).mean(1)
          if layer < num_layers - 1:
              x = _utils.activation.activation_func(
                  x, self.__activation
              )
          results.append(x)
      logging.debug(
          "{:d} layer, each layer shape {:s}".format(
              len(results), " ".join([str(x.shape) for x in results])
          )
      )
      return results
  
file_path: AutoGL/autogl/module/model/encoders/_dgl/_gat.py
imports: import logging
  import torch.nn.functional
  import typing
  import dgl
  from dgl.nn.pytorch.conv import GATConv
  from ..None import base_encoder, encoder_registry
  from ...None import _utils
label_desc: Use image node_id 2 for calling the GAT obj's underlying member method code with example usage: obj.forward(graph) and returns: results