persistent homology barcode python