<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def proto_value_for_feature(example, feature_name):
 """Get the value of a feature from Example regardless of feature type."""

  feature = get_example_features(example)[feature_name]
  if feature is None:
    raise ValueError('Feature {} is not on example proto.'.format(feature_name))
  feature_type = feature.WhichOneof('kind')
  if feature_type is None:
    raise ValueError('Feature {} on example proto has no declared type.'.format(
        feature_name))
  return getattr(feature, feature_type).value