scripts/histogram.py: fix function names reordering