Add more documentation for categorize_by_function.py