code: def test_concat_sparse_dense_applies_dropout_to_sparse_input() -> (
      None
  ):
      layer_dropout_for_sparse = ConcatenateSparseDenseFeatures(
          attribute=attribute_name,
          feature_type=SEQUENCE,
          feature_type_signature=[
              feature_signature_sparse_1,
              feature_signature_sparse_1,
          ],
          config=dict(
              model_config_basic,
              **{SPARSE_INPUT_DROPOUT: True, DROP_RATE: 1.0},
          ),
      )
  
      inputs = ([feature_sparse_seq_1, feature_sparse_seq_1],)
      expected_outputs_train = tf.zeros(
          (batch_size, max_seq_length, units_sparse_to_dense * 2)
      )
  
      train_outputs = layer_dropout_for_sparse(inputs, training=True)
      assert np.allclose(
          train_outputs.numpy(), expected_outputs_train.numpy()
      )
  
      # We can't check exact output contents for sparse inputs but during test-time no
      # dropout should be applied, hence the outputs should not be all zeros in this case
      # (unlike at training time).
      test_outputs = layer_dropout_for_sparse(inputs, training=False)
      assert not np.allclose(
          test_outputs.numpy(), expected_outputs_train.numpy()
      )
  
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 6 for calling a global function with example usage: test_concat_sparse_dense_applies_dropout_to_sparse_input() without return types