def _filter_plans(attr, name, plans):
 return [plan for plan in plans if (plan[attr] == name)]

def _filter_plans ( attr , name , plans ) : return [ plan for plan in plans if ( plan [ attr ] == name ) ]
helper to return list of usage plan items matching the given attribute value .