<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def acquire_try_once(self):
 """ Try to aquire the lock once. """

        
        if self.is_locked_by_me():
            return True
        else:
            try:
                self.fd = os.open(self.lock_filename, os.O_CREAT | os.O_RDWR | os.O_EXCL)
            except FileExistsError:
                logger.debug('I tried to get the lock {}, but another process was faster.'.format(self.lock_filename))
                return False
            else:
                os.write(self.fd, str(self.pid).encode('utf-8'))
                logger.debug('I got the lock {}.'.format(self.lock_filename))
                return True