def get_table_headings(choices):
 return filter((lambda x: (x['id'] in choices)), HEADING_CHOICES)

def get_table_headings ( choices ) : return filter ( ( lambda x : ( x [ 'id' ] in choices ) ) , HEADING_CHOICES )
filters the list of available table headings to the given choices .