def _update_example()

in tfx_addons/feature_selection/component.py [0:0]


def _update_example(selected_features, orig_example):
  result = {}
  for key, feature in orig_example.features.feature.items():
    if key in selected_features:
      result[key] = feature

  new_example = tf.train.Example(features=tf.train.Features(feature=result))
  return new_example