Intermediate function: it can be used as a transitional sentence, which plays the role of connecting the preceding with the following.
The function of the ending: it also has the function of summarizing the full text, or it can sublimate and deepen the thought.