docstr: Test making a regression chart with a single point on it.
docstr_tok: ["Test","making","a","regression","chart","with","a","single","point","on","it","."]
code: def test_make_json_formatted_for_single_chart_regression(self):
      """Test making a regression chart with a single point on it."""
      inference_result_proto = regression_pb2.RegressionResponse()
      regression = inference_result_proto.result.regressions.add()
      regression.value = 0.45
      regression = inference_result_proto.result.regressions.add()
      regression.value = 0.55
  
      original_feature = inference_utils.OriginalFeatureList(
          "feature_name", [2.0], "float_list"
      )
      mutant_feature = inference_utils.MutantFeatureValue(
          original_feature, index=0, mutant_value=20
      )
      mutant_feature_2 = inference_utils.MutantFeatureValue(
          original_feature, index=0, mutant_value=10
      )
  
      jsonable = inference_utils.make_json_formatted_for_single_chart(
          [mutant_feature, mutant_feature_2], inference_result_proto, 0
      )
  
      self.assertEqual(["value"], list(jsonable.keys()))
      self.assertEqual(2, len(jsonable["value"]))
      self.assertEqual(10, jsonable["value"][0]["step"])
      self.assertAlmostEqual(0.55, jsonable["value"][0]["scalar"])
      self.assertEqual(20, jsonable["value"][1]["step"])
      self.assertAlmostEqual(0.45, jsonable["value"][1]["scalar"])
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import os
  import sys
  import numpy
  import tensorflow
  from tensorflow_serving.apis import classification_pb2
  from tensorflow_serving.apis import predict_pb2
  from tensorflow_serving.apis import regression_pb2
  from utils import common_utils
  from utils import inference_utils
  from utils import platform_utils
  from utils import test_utils
label_desc: Use image node_id 20 for calling the InferenceUtilsTest obj's underlying member method code with example usage: obj.test_make_json_formatted_for_single_chart_regression() without return types