':return: The length of the longest hypernym path from this
synset to the root.'

def max_depth(self):

    if (u'_max_depth' not in self.__dict__):
        hypernyms = (self.hypernyms() + self.instance_hypernyms())
        if (not hypernyms):
            self._max_depth = 0
        else:
            self._max_depth = (1 + max((h.max_depth() for h in hypernyms)))
    return self._max_depth
