code: def test_graph_encoder_layer_shape():
      from deepchem.models.torch_models.layers import MolGANEncoderLayer
  
      vertices = 9
      nodes = 5
      edges = 5
      first_convolution_unit = 128
      second_convolution_unit = 64
      aggregation_unit = 128
      units = [
          (first_convolution_unit, second_convolution_unit),
          aggregation_unit,
      ]
  
      layer = MolGANEncoderLayer(units=units, edges=edges)
      adjacency_tensor = torch.randn((1, vertices, vertices, edges))
      node_tensor = torch.randn((1, vertices, nodes))
      model = layer([adjacency_tensor, node_tensor])
  
      assert model.shape == (1, aggregation_unit)
      assert layer.graph_convolution_units == (
          first_convolution_unit,
          second_convolution_unit,
      )
      assert layer.auxiliary_units == aggregation_unit
      assert layer.activation == torch.tanh
      assert layer.edges == 5
      assert layer.dropout_rate == 0.0
  
file_path: deepchem/deepchem/models/torch_models/tests/test_molgan_layers.py
imports: import pytest
label_desc: Use image node_id 7 for calling a global function with example usage: test_graph_encoder_layer_shape() without return types