code: def test_deadlock_task_with_nested_task(
      ray_with_memory_monitor,
  ):
      task_bytes = get_additional_bytes_to_reach_memory_usage_pct(
          memory_usage_threshold - 0.1
      )
      nested_task_bytes = (
          get_additional_bytes_to_reach_memory_usage_pct(
              memory_usage_threshold + 0.2
          )
          - task_bytes
      )
      with pytest.raises(ray.exceptions.RayTaskError) as _:
          ray.get(
              task_with_nested_task.options(max_retries=0).remote(
                  task_bytes=task_bytes,
                  nested_task_bytes=nested_task_bytes,
                  barrier=None,
              )
          )
  
imports: import sys
  import threading
  import pytest
  import ray
  from ray.tests.test_memory_pressure import allocate_memory, Leaker, get_additional_bytes_to_reach_memory_usage_pct, memory_usage_threshold, memory_monitor_refresh_ms
label_desc: Use image node_id 5 for calling a global function with example usage: test_deadlock_task_with_nested_task(ray_with_memory_monitor) without return types