<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def close(self, *, commit=True):
 """Closes the connection via the core's close method. :param commit: if true the current transaction is commited, otherwise it is rolled back :type commit: boolean :return: self """

    self.core.close(self.connection, commit=commit)
    self.connection = None
    return self