code: def test_last_task_of_the_group_fail_immediately():
      @ray.remote(max_retries=-1)
      def infinite_retry_task():
          chunks = []
          bytes_per_chunk = 1024 * 1024 * 1024
          while True:
              chunks.append([0] * bytes_per_chunk)
              time.sleep(5)
  
      with ray.init() as addr:
          with pytest.raises(ray.exceptions.OutOfMemoryError) as _:
              ray.get(infinite_retry_task.remote())
  
          wait_for_condition(
              has_metric_tagged_with_value,
              timeout=10,
              retry_interval_ms=100,
              addr=addr,
              tag="MemoryManager.TaskEviction.Total",
              value=1.0,
          )
  
imports: from math import ceil
  import sys
  import time
  import pytest
  import ray
  from ray._private import ray_constants
  import ray._private.gcs_utils
  from ray._private.test_utils import wait_for_condition, raw_metrics
  import numpy
  from ray._private.utils import get_system_memory
  from ray._private.utils import get_used_memory
  from ray._private.state_api_test_utils import verify_failed_task
  from ray.util.state.state_manager import StateDataSourceClient
label_desc: Use image node_id 17 for calling a global function with example usage: test_last_task_of_the_group_fail_immediately() without return types