code: def test_actor_stats_normal_task(ray_start_regular):
      # Because it works at the core worker level, this API works for tasks.
      @ray.remote
      def func():
          return ray.get_runtime_context()._get_actor_call_stats()
  
      assert ray.get(func.remote())["func"] == {
          "pending": 0,
          "running": 1,
          "finished": 0,
      }
  
imports: import ray
  import os
  import signal
  import time
  import sys
  import pytest
  import warnings
  from ray._private.test_utils import SignalActor
  from ray.util.scheduling_strategies import PlacementGroupSchedulingStrategy
  from ray.util.state import list_tasks
  from ray._private.test_utils import wait_for_condition
label_desc: Use image node_id 5 for calling a global function with example usage: test_actor_stats_normal_task(ray_start_regular) and returns: ray