code: def task_with_nested_task(
      task_bytes, nested_task_bytes, barrier=None
  ):
      dummy = alloc_mem(task_bytes)
      if barrier:
          ray.get(barrier.wait_all_done.remote())
      ray.get(
          allocate_memory.options(max_retries=0).remote(
              nested_task_bytes, post_allocate_sleep_s=0.1
          )
      )
      return dummy[0]
  
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 10 for calling a global function with example usage: task_with_nested_task(task_bytes, nested_task_bytes, barrier) and returns: dummy