def get_variable_set(self, variable_set, data):
if data.get('<STR_LIT>'):<EOL><INDENT>variable_set = []  <EOL><DEDENT>elif data.get('<STR_LIT>'):<EOL><INDENT>op, layer_ids = data['<STR_LIT>'].split('<STR_LIT::>', <NUM_LIT:1>)<EOL>op = op.lower()<EOL>layer_ids = [int(x) for x in layer_ids.split('<STR_LIT:U+002C>')]<EOL>if op in ('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>variable_set = [x for x in variable_set if x.index in layer_ids]<EOL><DEDENT>elif op in ('<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>variable_set = [x for x in variable_set if x.index not in layer_ids]<EOL><DEDENT><DEDENT>elif self.service.render_top_layer_only:<EOL><INDENT>variable_set = [variable_set[<NUM_LIT:0>]]<EOL><DEDENT>return variable_set<EOL>
Filters the given variable set based on request parameters