import numpy as np

from typing import Any
from rasa.nlu.training_data import Message
from rasa.nlu.components import Component
from rasa.nlu.constants import MESSAGE_VECTOR_FEATURE_NAMES, MESSAGE_TEXT_ATTRIBUTE


class Featurizer(Component):
    @staticmethod
    def _combine_with_existing_features(
        message,
        additional_features,
        feature_name=MESSAGE_VECTOR_FEATURE_NAMES[MESSAGE_TEXT_ATTRIBUTE],
    ):
        if message.get(feature_name) is not None:
            return np.hstack((message.get(feature_name), additional_features))
        else:
            return additional_features

@@ -35,16 +35,22 @@
 port Any
+, Text
 %0Afrom ra
@@ -316,16 +316,25 @@
  message
+: Message
 ,%0A      
@@ -354,16 +354,21 @@
 features
+: Any
 ,%0A      
@@ -385,9 +385,17 @@
 name
-=
+: Text = 
 MESS
@@ -449,16 +449,23 @@
 %5D,%0A    )
+ -%3E Any
 :%0A      

add typing to _combine_with_existing_features