code: def get_variable_set(self, variable_set, data):
          
  
          if data.get('dynamic_layers'):
              variable_set = []  # TODO
          elif data.get('layers'):
              op, layer_ids = data['layers'].split(':', 1)
              op = op.lower()
              layer_ids = [int(x) for x in layer_ids.split(',')]
  
              if op in ('show', 'include'):
                  variable_set = [x for x in variable_set if x.index in layer_ids]
              elif op in ('hide', 'exclude'):
                  variable_set = [x for x in variable_set if x.index not in layer_ids]
          elif self.service.render_top_layer_only:
              variable_set = [variable_set[0]]
  
          return variable_set
docs: Filters the given variable set based on request parameters