code: def _generate_feature_list_and_modifications(
      is_sparse: bool, type: Text, number: int
  ) -> Tuple[List[Features], List[Dict[Text, Any]]]:
      """Creates a list of features with the required properties and some modifications.
      The modifications are given by a list of kwargs dictionaries that can be used to
      instantiate `Features` that differ from the aforementioned list of features in
      exactly one property (i.e. type, sequence length (if the given `type` is
      sequence type only), attribute, origin)
      Args:
          is_sparse: whether all features should be sparse
          type: the type to be used for all features
          number: the number of features to generate
      Returns:
        a tuple containing a list of features with the requested attributes and
        a list of kwargs dictionaries that can be used to instantiate `Features` that
        differ from the aforementioned list of features in exactly one property
      """
  
      seq_len = 3
      first_dim = 1 if type == FEATURE_TYPE_SENTENCE else 3
  
      # create list of features whose properties match - except the shapes and
      # feature values which are chosen in a specific way
      features_list = []
      for idx in range(number):
          matrix = np.full(
              shape=(first_dim, idx + 1), fill_value=idx + 1
          )
          if is_sparse:
              matrix = scipy.sparse.coo_matrix(matrix)
          config = dict(
              features=matrix,
              attribute="fixed-attribute",
              feature_type=type,
              origin=f"origin-{idx}",
          )
          feat = Features(**config)
          features_list.append(feat)
  
      # prepare some Features that differ from the features above in certain ways
      modifications = []
      # - if we modify one attribute
      modifications.append({**config, **{"attribute": "OTHER"}})
      # - if we modify one attribute
      other_type = (
          FEATURE_TYPE_SENTENCE
          if type == FEATURE_TYPE_SEQUENCE
          else FEATURE_TYPE_SEQUENCE
      )
      other_seq_len = (
          1 if other_type == FEATURE_TYPE_SENTENCE else seq_len
      )
      other_matrix = np.full(
          shape=(other_seq_len, number - 1), fill_value=number
      )
      if is_sparse:
          other_matrix = scipy.sparse.coo_matrix(other_matrix)
      modifications.append(
          {
              **config,
              **{"feature_type": other_type, "features": other_matrix},
          }
      )
      # - if we modify one origin
      modifications.append({**config, **{"origin": "Other"}})
      # - if we modify one sequence length
      if type == FEATURE_TYPE_SEQUENCE:
          matrix = np.full(shape=(seq_len + 1, idx + 1), fill_value=idx)
          if is_sparse:
              matrix = scipy.sparse.coo_matrix(matrix)
          modifications.append({**config, **{"features": matrix}})
  
      return features_list, modifications
  
imports: import itertools
  from typing import Optional, Text, List, Dict, Tuple, Any
  import numpy
  import pytest
  import scipy.sparse
  from rasa.shared.nlu.training_data.features import Features
  from rasa.shared.nlu.constants import FEATURE_TYPE_SENTENCE, FEATURE_TYPE_SEQUENCE, TEXT, INTENT
label_desc: Use image node_id 8 for calling a global function with example usage: _generate_feature_list_and_modifications(is_sparse, type, number) and returns: features_list,  modifications