code: def validate_extracted_features(
      extracted_features,
      feature_names,
      expected_feature_names,
      data,
      feature_metadata=None,
  ):
      assert len(extracted_features) == len(data)
      assert feature_names[0] == expected_feature_names[0]
      for i in range(1, len(feature_names)):
          assert feature_names[i] in expected_feature_names
      assert len(feature_names) == len(expected_feature_names)
      assert len(extracted_features[0]) == len(feature_names)
      if feature_metadata is not None:
          assert len(feature_metadata.categorical_features) <= len(
              feature_names
          )
          for (
              categorical_feature
          ) in feature_metadata.categorical_features:
              assert categorical_feature in feature_names
  
file_path: responsible-ai-toolbox/responsibleai_vision/tests/test_feature_extractors.py
imports: from common_vision_utils import load_flowers_dataset, load_fridge_dataset, load_fridge_object_detection_dataset, load_imagenet_dataset
  from responsibleai.feature_metadata import FeatureMetadata
  from responsibleai_vision.common.constants import ExtractedFeatures, ImageColumns, ImageModes
  from responsibleai_vision.utils.feature_extractors import extract_features
label_desc: Use image node_id 1 for calling a global function with example usage: validate_extracted_features(extracted_features, feature_names, expected_feature_names, data, feature_metadata) without return types