code: def test_example_weight_map(self):
      options = stats_options.StatsOptions()
      self.assertIsNone(
          options.example_weight_map.get(types.FeaturePath(["f"]))
      )
      self.assertEqual(
          frozenset([]),
          options.example_weight_map.all_weight_features(),
      )
  
      options = stats_options.StatsOptions(weight_feature="w")
      self.assertEqual(
          "w", options.example_weight_map.get(types.FeaturePath(["f"]))
      )
      self.assertEqual(
          frozenset(["w"]),
          options.example_weight_map.all_weight_features(),
      )
  
      options = stats_options.StatsOptions(
          per_feature_weight_override={types.FeaturePath(["x"]): "w"}
      )
      self.assertIsNone(
          options.example_weight_map.get(types.FeaturePath(["f"]))
      )
      self.assertEqual(
          "w", options.example_weight_map.get(types.FeaturePath(["x"]))
      )
      self.assertEqual(
          frozenset(["w"]),
          options.example_weight_map.all_weight_features(),
      )
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import sys
  from typing import Optional
  import unittest
  from absl.testing import absltest
  from absl.testing import parameterized
  from tensorflow_data_validation import types
  from tensorflow_data_validation.statistics import stats_options
  from tensorflow_data_validation.statistics.generators import lift_stats_generator
  from tensorflow_data_validation.utils import slicing_util
  from tfx_bsl.public.proto import slicing_spec_pb2
  from google.protobuf import text_format
  from tensorflow.python.util.protobuf import compare
  from tensorflow_metadata.proto.v0 import schema_pb2
label_desc: Use image node_id 7 for calling the StatsOptionsTest obj's underlying member method code with example usage: obj.test_example_weight_map() without return types