code: def leaf_count(self):
          
          if not self._sub_categories:
              return 1
          return sum(category.leaf_count for category in self._sub_categories)
docs: The number of leaf category nodes under this category. Returns
          1 if this category has no sub-categories.