def METHOD_NAME(self, tree):
    if self.if_empty_tree != 'process' and not tree.descendants:
        if self.if_empty_tree == 'skip':
            return False
        elif self.if_empty_tree == 'delete':
            tree.remove()
            return False
        elif self.if_empty_tree == 'skip_warn':
            logging.warning("Tree %s is empty", tree)
            return False
        elif self.if_empty_tree == 'fail':
            raise Exception("Tree %s is empty" % tree)
        else:
            raise ValueError("Unknown value for if_empty_tree: "
                             + self.if_empty_tree)
    if self.zones == 'all':
        return True
    if self.zones == '' and tree.zone == '':
        return True
    if tree.zone in self.zones.split(','):
        return True
    return False