Make the 'compact_range' call available in python