'Modifies the lease of a task in this queue.
Args:
task: A task instance that will have its lease modified.
lease_seconds: Number of seconds, from the current time, that the task
lease will be modified to. If lease_seconds is 0, then the task lease
is removed and the task will be available for leasing again using
the lease_tasks method.
Raises:
TypeError: if lease_seconds is not a valid float or integer.
InvalidLeaseTimeError: if lease_seconds is outside the valid range.
Error-subclass on application errors.'

def modify_task_lease(self, task, lease_seconds):

    lease_seconds = self._ValidateLeaseSeconds(lease_seconds)
    request = taskqueue_service_pb.TaskQueueModifyTaskLeaseRequest()
    response = taskqueue_service_pb.TaskQueueModifyTaskLeaseResponse()
    request.set_queue_name(self.__name)
    request.set_task_name(task.name)
    request.set_eta_usec(task._eta_usec)
    request.set_lease_seconds(lease_seconds)
    try:
        apiproxy_stub_map.MakeSyncCall('taskqueue', 'ModifyTaskLease', request, response)
    except apiproxy_errors.ApplicationError as e:
        raise _TranslateError(e.application_error, e.error_detail)
    task._Task__eta_posix = (response.updated_eta_usec() * 1e-06)
    task._Task__eta = None
