code: def _make_feature_stats_proto(
      stats_values: Dict[Text, float], feature_path: types.FeaturePath
  ) -> statistics_pb2.FeatureNameStatistics:
      """Creates the FeatureNameStatistics proto for one feature.
  
      Args:
        stats_values: A Dict[str,float] where the key of the dict is the name of the
          custom statistic and the value is the numeric value of the custom
          statistic of that feature. Ex. {
                  'Mutual Information': 0.5,
                  'Correlation': 0.1 }
        feature_path: The path of the feature.
  
      Returns:
        A FeatureNameStatistic proto containing the custom statistics for a
        feature.
      """
  
      result = statistics_pb2.FeatureNameStatistics()
      result.path.CopyFrom(feature_path.to_proto())
  
      # Sort alphabetically by statistic name to have deterministic ordering
      stat_names = sorted(stats_values.keys())
      for stat_name in stat_names:
          result.custom_stats.add(
              name=stat_name, num=stats_values[stat_name]
          )
      return result
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import logging
  from typing import Dict, Iterable, Optional, Sequence, Text, Tuple, Union
  import numpy
  import pyarrow
  import tensorflow
  from tensorflow_data_validation import constants
  from tensorflow_data_validation import types
  from tensorflow_data_validation.arrow import arrow_util
  from tensorflow_data_validation.utils import artifacts_io_impl
  from tensorflow_data_validation.utils import io_util
  from tfx_bsl import statistics
  from tfx_bsl.arrow import array_util
  from google.protobuf import text_format
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 5 for calling a global function with example usage: _make_feature_stats_proto(stats_values, feature_path) and returns: result