def acquire(self):

        pid_file = os.open(self.pid_filename, os.O_CREAT | os.O_EXCL | os.O_RDWR)
        os.write(pid_file, str(os.getpid()).encode('utf-8'))
        os.close(pid_file)

        if hasattr(os, 'symlink'):
            os.symlink(self.pid_filename, self.lock_filename)
        else:
            # Windows platforms doesn't support symlinks, at least not through the os API
            self.lock_filename = self.pid_filename
Generate the model and store it under the property `m`.
dataset/ETHPy150Open ui/django-post_office/post_office/lockfile.py/FileLock.acquire--crossover with--dataset/ETHPy150Open calliope-project/calliope/calliope/core.py/Model.generate_model