What is the use of the "close" method in a Python file?