code: def test_ray_debugger_recursive(shutdown_only):
      ray.init(num_cpus=1)
  
      @ray.remote
      def fact(n):
          if n < 1:
              return n
          ray.util.pdb.set_trace()
          n_id = fact.remote(n - 1)
          return n * ray.get(n_id)
  
      result = fact.remote(5)
  
      p = pexpect.spawn("ray debug")
      p.expect("Enter breakpoint index or press enter to refresh: ")
      p.sendline("0")
      p.expect("(Pdb)")
      p.sendline("remote")
      p.expect("(Pdb)")
      p.sendline("remote")
      p.expect("(Pdb)")
      p.sendline("remote")
      p.expect("(Pdb)")
      p.sendline("remote")
      p.expect("(Pdb)")
      p.sendline("remote")
      p.expect("(Pdb)")
      p.sendline("remote")
  
      ray.get(result)
  
imports: import json
  import os
  import platform
  import subprocess
  import sys
  from telnetlib import Telnet
  import unittest
  import pexpect
  import pytest
  import ray
  from ray._private import ray_constants, services
  from ray._private.test_utils import run_string_as_driver, wait_for_condition
  from ray.cluster_utils import Cluster, cluster_not_supported
label_desc: Use image node_id 4 for calling a global function with example usage: test_ray_debugger_recursive(shutdown_only) and returns: unknown, n