Updates the duration of a task lease

        If the task isn't found (backend 404), raises a
        :class:`gcloud.exceptions.NotFound`.

        :type id: string
        :param id: A task name to update

        :type new_lease_time: int
        :param new_lease_time: New lease time, in seconds.

        :type client: :class:`gcloud.taskqueue.client.Client` or ``NoneType``
        :param client: Optional. The client to use.  If not passed, falls back
                       to the ``client`` stored on the task's taskqueue.

        :rtype: :class:`_Task`.
        :returns: a task
        :raises: :class:`gcloud.exceptions.NotFound`

def update_task(self, id, new_lease_time, client=None):
        """ Updates the duration of a task lease

        If the task isn't found (backend 404), raises a
        :class:`gcloud.exceptions.NotFound`.

        :type id: string
        :param id: A task name to update

        :type new_lease_time: int
        :param new_lease_time: New lease time, in seconds.

        :type client: :class:`gcloud.taskqueue.client.Client` or ``NoneType``
        :param client: Optional. The client to use.  If not passed, falls back
                       to the ``client`` stored on the task's taskqueue.

        :rtype: :class:`_Task`.
        :returns: a task
        :raises: :class:`gcloud.exceptions.NotFound`
        """
        client = self._require_client(client)
        task = Task(taskqueue=self, id=id)
        try:
            response = client.connection.api_request(method='POST', path=self.path + "/tasks/" + id,
                                                     query_params={"newLeaseSeconds": new_lease_time},
                                                     _target_object=task)
            task._set_properties(response)
            return task
        except NotFound:
            return None