class_docstr: Generates statistics for weighted features.
code: def __init__(
      self,
      schema: schema_pb2.Schema,
      name: Text = "WeightedFeatureStatsGenerator",
  ) -> None:
      constituents = []
      for weighted_feature in schema.weighted_feature:
          weight = types.FeaturePath.from_proto(
              weighted_feature.weight_feature
          )
          value = types.FeaturePath.from_proto(weighted_feature.feature)
          component_paths = [weight, value]
          constituents.append(
              length_diff_generator.LengthDiffGenerator(
                  weight, value, required_paths=component_paths
              )
          )
          constituents.append(
              count_missing_generator.CountMissingGenerator(
                  value, required_paths=component_paths
              )
          )
          constituents.append(
              count_missing_generator.CountMissingGenerator(
                  weight, required_paths=component_paths
              )
          )
      super(WeightedFeatureStatsGenerator, self).__init__(
          name, constituents, schema
      )
  
file_path: data-validation/tensorflow_data_validation/statistics/generators/weighted_feature_stats_generator.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from tensorflow_data_validation import types
  from tensorflow_data_validation.statistics.generators import stats_generator
  from tensorflow_data_validation.statistics.generators.constituents import count_missing_generator
  from tensorflow_data_validation.statistics.generators.constituents import length_diff_generator
  from typing import Any, Dict, Text
  from tensorflow_metadata.proto.v0 import schema_pb2
  from tensorflow_metadata.proto.v0 import statistics_pb2
label_desc: Use image node_id 1 to create a new WeightedFeatureStatsGenerator object from inherited base classes: stats_generator with example: obj = WeightedFeatureStatsGenerator(schema, name)