code: def numYields(self):
          
          if not self._counters_calculated:
              self._counters_calculated = True
              self._extract_counters()
  
          return self._numYields
docs: Extract numYields counter if available (lazy).