should be self._calc_depth instead of self.calc_depth?