code: def test_eligible_features_from_example_proto(self):
      example = test_utils.make_fake_example(single_int_val=2)
      self.plugin.examples = [example]
  
      response = self.server.get(
          "/data/plugin/whatif/eligible_features"
      )
      self.assertEqual(200, response.status_code)
  
      # Returns a list of dict objects that have been sorted by feature_name.
      data = self._DeserializeResponse(response.get_data())
  
      sorted_feature_names = [
          "non_numeric",
          "repeated_float",
          "repeated_int",
          "single_float",
          "single_int",
      ]
      self.assertEqual(sorted_feature_names, [d["name"] for d in data])
      np.testing.assert_almost_equal(
          [-1, 1.0, 10, 24.5, 2.0],
          [d.get("observedMin", -1) for d in data],
      )
      np.testing.assert_almost_equal(
          [-1, 4.0, 20, 24.5, 2.0],
          [d.get("observedMax", -1) for d in data],
      )
  
      # Test that only non_numeric feature has samples.
      self.assertFalse(any(d.get("samples") for d in data[1:]))
      self.assertEqual(["cat"], data[0]["samples"])
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import json
  import os
  import sys
  import numpy
  import tensorflow
  from six.moves import urllib_parse
  from google.protobuf import json_format
  from tensorflow_serving.apis import regression_pb2
  from werkzeug import test
  from werkzeug import wrappers
  from tensorboard.backend import application
  from tensorboard.backend.event_processing import plugin_event_multiplexer
  from tensorboard.plugins import base_plugin
  from utils import inference_utils
  from utils import platform_utils
  from utils import test_utils
  import wit_plugin
label_desc: Use image node_id 9 for calling the InferencePluginTest obj's underlying member method code with example usage: obj.test_eligible_features_from_example_proto() without return types