code: def testMaterializeFeaturesWithExcludes(self):
      example1 = self._makeExample(
          age=3.0,
          language="english",
          label=1.0,
          slice_key="first_slice",
      )
  
      features = {
          "f": {encoding.NODE_SUFFIX: np.array([1])},
          "s": {
              encoding.NODE_SUFFIX: tf.compat.v1.SparseTensorValue(
                  indices=[[0, 5], [1, 2], [3, 6]],
                  values=[100.0, 200.0, 300.0],
                  dense_shape=[4, 10],
              )
          },
      }
      predictions = {"p": {encoding.NODE_SUFFIX: np.array([2])}}
      labels = {"l": {encoding.NODE_SUFFIX: np.array([3])}}
  
      extracts = {
          constants.INPUT_KEY: example1.SerializeToString(),
          constants.FEATURES_PREDICTIONS_LABELS_KEY: types.FeaturesPredictionsLabels(
              input_ref=0,
              features=features,
              predictions=predictions,
              labels=labels,
          ),
      }
      result = feature_extractor._MaterializeFeatures(
          extracts, excludes=["s"]
      )
      self.assertNotIn("features__s", result)
  
file_path: model-analysis/tensorflow_model_analysis/extractors/legacy_feature_extractor_test.py
imports: import os
  import tempfile
  import numpy
  import tensorflow
  from tensorflow_model_analysis import constants
  from tensorflow_model_analysis.api import types
  from tensorflow_model_analysis.eval_saved_model import encoding
  from tensorflow_model_analysis.eval_saved_model import testutil
  from tensorflow_model_analysis.extractors import legacy_feature_extractor
label_desc: Use image node_id 9 for calling the BuildDiagnosticsTableTest obj's underlying member method code with example usage: obj.testMaterializeFeaturesWithExcludes() without return types