'Is it a fold header line?
If so, return fold level
If not, return None'

def get_fold_level(self, block_nb):

    block = self.document().findBlockByNumber(block_nb)
    return self.get_block_data(block).fold_level
