code: def test_feature_combining_correct_output(
      attribute_signature: Dict[Text, List[FeatureSignature]],
      inputs: List[List[Union[tf.SparseTensor, tf.Tensor]]],
      expected_outputs_train: List[np.ndarray],
      expected_outputs_test: Union[Text, List[np.ndarray]],
  ) -> None:
      layer = RasaFeatureCombiningLayer(
          attribute=attribute_name,
          config=model_config_basic,
          attribute_signature=attribute_signature,
      )
      if expected_outputs_test == "same_as_train":
          expected_outputs_test = expected_outputs_train
  
      train_outputs, train_mask_seq_sent = layer(inputs, training=True)
      assert (train_outputs.numpy() == expected_outputs_train[0]).all()
      assert (
          train_mask_seq_sent.numpy() == expected_outputs_train[1]
      ).all()
  
      test_outputs, test_mask_seq_sent = layer(inputs, training=False)
      assert (test_outputs.numpy() == expected_outputs_test[0]).all()
      assert (
          test_mask_seq_sent.numpy() == expected_outputs_test[1]
      ).all()
  
imports: import pytest
  import tensorflow
  import numpy
  from typing import Text, Union, Any, Dict, List, Type
  from rasa.shared.nlu.constants import TEXT, FEATURE_TYPE_SENTENCE, FEATURE_TYPE_SEQUENCE
  from rasa.utils.tensorflow import layers
  from rasa.utils.tensorflow.rasa_layers import ConcatenateSparseDenseFeatures, RasaFeatureCombiningLayer, RasaSequenceLayer, RasaCustomLayer
  from rasa.utils.tensorflow.constants import DENSE_INPUT_DROPOUT, SPARSE_INPUT_DROPOUT, DROP_RATE, DENSE_DIMENSION, REGULARIZATION_CONSTANT, CONCAT_DIMENSION, CONNECTION_DENSITY, DROP_RATE_ATTENTION, KEY_RELATIVE_ATTENTION, VALUE_RELATIVE_ATTENTION, MAX_RELATIVE_POSITION, UNIDIRECTIONAL_ENCODER, HIDDEN_LAYERS_SIZES, NUM_TRANSFORMER_LAYERS, TRANSFORMER_SIZE, NUM_HEADS, SENTENCE, SEQUENCE, MASKED_LM, LABEL
  from rasa.utils.tensorflow.exceptions import TFLayerConfigException
  from rasa.utils.tensorflow.model_data import FeatureSignature
label_desc: Use image node_id 8 for calling a global function with example usage: test_feature_combining_correct_output(attribute_signature, inputs, expected_outputs_train, expected_outputs_test) without return types