Get the next task from the raylet.

        Returns:
            A task from the raylet.

def _get_next_task_from_raylet(self):
        """Get the next task from the raylet.

        Returns:
            A task from the raylet.
        """
        with profiling.profile("worker_idle"):
            task = self.raylet_client.get_task()

        # Automatically restrict the GPUs available to this task.
        ray.utils.set_cuda_visible_devices(ray.get_gpu_ids())

        return task