code: def _left_zero_blocks(self, r):
      
      if not self._include_off_diagonal:
        return r
      elif not self._upper:
        return 0
      elif self._include_diagonal:
        return r
      else:
        return r + 1
docs: Number of blocks with zeros from the left in block row `r`.