code: def test_constructor(self):
      parallel_transformer_block = self.parallel_transformer_block
      assert isinstance(parallel_transformer_block, TransformerBlock)
      num_weights = sum(
          [p.numel() for p in parallel_transformer_block.parameters()]
      )
      assert num_weights == 3792
      assert (
          parallel_transformer_block.num_layers_per_pipeline_rank == 2
      )
      assert len(parallel_transformer_block.layers) == 2
      layer_0: TransformerLayer = parallel_transformer_block._get_layer(
          0
      )
      assert layer_0.layer_number == 1
      layer_1: TransformerLayer = parallel_transformer_block._get_layer(
          1
      )
      assert layer_1.layer_number == 2
  
file_path: megatron-lm/tests/unit_tests/transformer/test_transformer_block.py
imports: import os
  import pytest
  import torch
  from megatron.core import dist_checkpointing
  from megatron.core.transformer.transformer_config import TransformerConfig
  from megatron.core.transformer.transformer_layer import TransformerLayer
  from megatron.core.transformer.transformer_block import TransformerBlock
  from tests.unit_tests.test_utilities import Utils
  from megatron.core.tensor_parallel.random import model_parallel_cuda_manual_seed
  from megatron.core.models.gpt.gpt_layer_specs import get_gpt_layer_with_transformer_engine_spec
label_desc: Use image node_id 3 for calling the TestParallelTransformerBlock obj's underlying member method code with example usage: obj.test_constructor() without return types