(example, feature_list=None)
return {f: example[f] for f in feature_list if f in example}
Select a subset of features from the example dict.
Select a subset of features from the example dict.
Select a subset of features from the example dict .
def _select_features(example, feature_list=None):
  """Select a subset of features from the example dict."""
  feature_list = feature_list or ['inputs', 'targets']
  return {f: example[f] for f in feature_list if f in example}
def _select_features ( example , feature_list = None ) : feature_list = feature_list or [ 'inputs' , 'targets' ] return { f : example [ f ] for f in feature_list if f in example }