'Removes unused features or classes from the given data. Returns a new
data table.
Parameters
data : Orange.data.Table
A data table to remove features or classes from.
Returns
data : Orange.data.Table
New data table.'

def __call__(self, data):

    if (data is None):
        return None
    domain = data.domain
    attrs_state = [purge_var_M(var, data, self.attr_flags) for var in domain.attributes]
    class_state = [purge_var_M(var, data, self.class_flags) for var in domain.class_vars]
    metas_state = [purge_var_M(var, data, self.meta_flags) for var in domain.metas]
    (att_vars, self.attr_results) = self.get_vars_and_results(attrs_state)
    (cls_vars, self.class_results) = self.get_vars_and_results(class_state)
    (meta_vars, self.meta_results) = self.get_vars_and_results(metas_state)
    domain = Domain(att_vars, cls_vars, meta_vars)
    return data.transform(domain)
