code: def __init__(self, expected_depth=1):
      task_depth = ray._private.worker.global_worker.task_depth
      assert task_depth == expected_depth
  
file_path: ray/python/ray/tests/test_nested_task.py
imports: import sys
  import threading
  import pytest
  import ray
label_desc: Use image node_id 1 to create a new NestedActor object  with example: obj = NestedActor(expected_depth)