code: def test_feature_block(
      input_size,
      size: int,
      apply_glu: bool,
      external_shared_fc_layer: bool,
      bn_virtual_bs: Optional[int],
      batch_size: int,
  ) -> None:
      # setup synthetic tensor
      torch.manual_seed(RANDOM_SEED)
      input_tensor = torch.randn(
          [batch_size, input_size], dtype=torch.float32
      )
  
      if external_shared_fc_layer:
          shared_fc_layer = torch.nn.Linear(
              input_size, size * 2 if apply_glu else size, bias=False
          )
      else:
          shared_fc_layer = None
  
      feature_block = FeatureBlock(
          input_size,
          size,
          apply_glu=apply_glu,
          shared_fc_layer=shared_fc_layer,
          bn_virtual_bs=bn_virtual_bs,
      )
  
      output_tensor = feature_block(input_tensor)
  
      # check for expected structure and properties
      assert isinstance(output_tensor, torch.Tensor)
      assert output_tensor.shape == (batch_size, size)
  
      assert feature_block.input_shape[-1] == input_size
      assert feature_block.output_shape[-1] == size
      assert feature_block.input_dtype == torch.float32
  
file_path: ludwig/tests/ludwig/modules/test_tabnet_modules.py
imports: from typing import Optional
  import pytest
  import torch
  from ludwig.modules.tabnet_modules import AttentiveTransformer, FeatureBlock, FeatureTransformer, TabNet
  from ludwig.utils.entmax import sparsemax
  from tests.integration_tests.parameter_update_utils import check_module_parameters_updated
label_desc: Use image node_id 2 for calling a global function with example usage: test_feature_block(input_size, size, apply_glu, external_shared_fc_layer, bn_virtual_bs, batch_size) without return types