code: def test_actor_task_stacktrace(ray_start_regular):
      """Test the actor task stacktrace."""
      expected_output = """ray::A.f() (pid=XXX, ip=YYY, actor_id={actor_id}, repr=ZZZ) # noqa
    File "FILE", line ZZ, in f
      return g(c)
    File "FILE", line ZZ, in g
      raise ValueError(a)
  ValueError: 7"""
  
      def g(a):
          raise ValueError(a)
  
      @ray.remote
      class A:
          def f(self):
              a = 3
              b = 4
              c = a + b
              return g(c)
  
      a = A.remote()
      try:
          ray.get(a.f.remote())
      except ValueError as ex:
          print(ex)
          assert clean_noqa(
              expected_output.format(actor_id=a._actor_id.hex())
          ) == scrub_traceback(str(ex))
  
file_path: ray/python/ray/tests/test_traceback.py
imports: import re
  import sys
  import threading
  import pytest
  import ray
  from ray.exceptions import RayTaskError, RayActorError
label_desc: Use image node_id 5 for calling a global function with example usage: test_actor_task_stacktrace(ray_start_regular) and returns: g