Fix incompatibility bug with python 2.7 in nested_blockmodel.py