'Acquire and renew a lease.
:param datetime now: The current date/time.
:param UUID dataset_id: The dataset on which to acquire a lease.
:param UUID node_uuid: The node which will hold this lease.
:param int expires: The number of seconds from ``now`` until the
lease expires.
:return: The updated ``Leases`` representation.'

def acquire(self, now, dataset_id, node_id, expires=None):

    self._check_lease(dataset_id, node_id, LEASE_ACTION_ACQUIRE)
    if (expires is None):
        expiration = None
    else:
        expiration = (now + timedelta(seconds=expires))
    lease = Lease(dataset_id=dataset_id, node_id=node_id, expiration=expiration)
    return self.set(dataset_id, lease)
