<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def lock(self, fail_on_lock=False, cleanup=False):
 """ Allows to lock a file via abl.util.LockFile, with the same parameters there. Returns an opened, writable file. """

        return self.connection.lock(self, fail_on_lock, cleanup)