code: def convert_to_data_format(
      features: Union[
          List[List[Dict[Text, List["Features"]]]],
          List[Dict[Text, List["Features"]]],
      ],
      fake_features: Optional[Dict[Text, List["Features"]]] = None,
      consider_dialogue_dimension: bool = True,
      featurizers: Optional[List[Text]] = None,
  ) -> Tuple[Data, Dict[Text, List["Features"]]]:
      """Converts the input into "Data" format.
  
      "features" can, for example, be a dictionary of attributes (INTENT,
      TEXT, ACTION_NAME, ACTION_TEXT, ENTITIES, SLOTS, FORM) to a list of features for
      all dialogue turns in all training trackers.
      For NLU training it would just be a dictionary of attributes (either INTENT or
      RESPONSE, TEXT, and potentially ENTITIES) to a list of features for all training
      examples.
  
      The "Data" format corresponds to Dict[Text, Dict[Text, List[FeatureArray]]]. It's
      a dictionary of attributes (e.g. TEXT) to a dictionary of secondary attributes
      (e.g. SEQUENCE or SENTENCE) to the list of actual features.
  
      Args:
          features: a dictionary of attributes to a list of features for all
              examples in the training data
          fake_features: Contains default feature values for attributes
          consider_dialogue_dimension: If set to false the dialogue dimension will be
              removed from the resulting sequence features.
          featurizers: the featurizers to consider
  
      Returns:
          Input in "Data" format and fake features
      """
      training = False
      if not fake_features:
          training = True
          fake_features = defaultdict(list)
  
      # unify format of incoming features
      if isinstance(features[0], Dict):
          features = cast(
              List[List[Dict[Text, List["Features"]]]],
              [[dicts] for dicts in features],
          )
  
      attribute_to_features = _surface_attributes(features, featurizers)
  
      attribute_data = {}
  
      # During prediction we need to iterate over the fake features attributes to
  
      # have all keys in the resulting model data
      if training:
          attributes = list(attribute_to_features.keys())
      else:
          attributes = list(fake_features.keys())
  
      # In case an attribute is not present during prediction, replace it with
      # None values that will then be replaced by fake features
      dialogue_length = 1
      num_examples = 1
      for _features in attribute_to_features.values():
          num_examples = max(num_examples, len(_features))
          dialogue_length = max(dialogue_length, len(_features[0]))
      absent_features = [[None] * dialogue_length] * num_examples
  
      for attribute in attributes:
          attribute_data[attribute] = _feature_arrays_for_attribute(
              attribute,
              absent_features,
              attribute_to_features,
              training,
              fake_features,
              consider_dialogue_dimension,
          )
  
      # ensure that all attributes are in the same order
      attribute_data = OrderedDict(sorted(attribute_data.items()))
  
      return attribute_data, fake_features
  
imports: import typing
  import copy
  import numpy
  import scipy.sparse
  from collections import defaultdict, OrderedDict
  from typing import List, Optional, Text, Dict, Tuple, Union, Any, DefaultDict, cast
  from rasa.nlu.constants import TOKENS_NAMES
  from rasa.utils.tensorflow.model_data import Data, FeatureArray, ragged_array_to_ndarray
  from rasa.utils.tensorflow.constants import MASK, IDS
  from rasa.shared.nlu.training_data.message import Message
  from rasa.shared.nlu.constants import TEXT, ENTITIES, ENTITY_ATTRIBUTE_TYPE, ENTITY_ATTRIBUTE_GROUP, ENTITY_ATTRIBUTE_ROLE
label_desc: Use image node_id 7 for calling a global function with example usage: convert_to_data_format(features, fake_features, consider_dialogue_dimension, featurizers) and returns: attribute_data,  fake_features