def _dict_subset(keys, master_dict):
 return dict([(k, v) for (k, v) in six.iteritems(master_dict) if (k in keys)])

def _dict_subset ( keys , master_dict ) : return dict ( [ ( k , v ) for ( k , v ) in six . iteritems ( master_dict ) if ( k in keys ) ] )
return a dictionary of only the subset of keys/values specified in keys .