'Set z-sorting behaviour:
boolean: if True use default \'average\'
string: \'average\', \'min\' or \'max\''

def set_zsort(self, zsort):

    if (zsort is True):
        zsort = u'average'
    if (zsort is not False):
        if (zsort in self._zsort_functions):
            zsortfunc = self._zsort_functions[zsort]
        else:
            return False
    else:
        zsortfunc = None
    self._zsort = zsort
    self._sort_zpos = None
    self._zsortfunc = zsortfunc
    self.stale = True
