Add 'is_python_file' to libutils to avoid using pycore directly.