What is the use of the "chain" function in Python?