def _take_lease(self, lease, uuid_path, safe=True):
if safe:<EOL><INDENT>lease_taken_by = self._lease_valid(lease)<EOL>if lease_taken_by and lease_taken_by != uuid_path:<EOL><INDENT>raise LagoSubnetLeaseTakenException(<EOL>lease.subnet, lease_taken_by<EOL>)<EOL><DEDENT><DEDENT>with open(uuid_path) as f:<EOL><INDENT>uuid = f.read()<EOL><DEDENT>with open(lease.path, '<STR_LIT>') as f:<EOL><INDENT>utils.json_dump((uuid_path, uuid), f)<EOL><DEDENT>LOGGER.debug(<EOL>'<STR_LIT>'.format(lease.path, uuid_path)<EOL>)<EOL>
Persist the given lease to the store and make the prefix in uuid_path
his owner

Args:
    lease(lago.subnet_lease.Lease): Object representation of the lease
    uuid_path (str): Path to the prefix uuid
    safe (bool): If true (the default), validate the the lease
        isn't taken.

Raises:
    LagoSubnetLeaseException: If safe == True and the lease is already
        taken.