code: def to_total_hidden_dimensions(
      cls,
      per_head_dimensions: _typing.Sequence[int],
      num_hidden_heads: int,
      num_output_heads: int,
      concat_last: bool = False,
  ):
      return [
          d
          * (
              num_hidden_heads
              if layer < (len(per_head_dimensions) - 1)
              else (num_output_heads if concat_last else 1)
          )
          for layer, d in enumerate(per_head_dimensions)
      ]
  
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 1 for calling the GATUtils obj's underlying member method code with example usage: obj.to_total_hidden_dimensions(cls, per_head_dimensions, num_hidden_heads, num_output_heads, concat_last) and returns: unknown