code: def test_actor_stats_threaded_actor(ray_start_regular):
      signal = SignalActor.remote()
  
      @ray.remote
      class ThreadedActor:
          def func(self):
              ray.get(signal.wait.remote())
              return ray.get_runtime_context()._get_actor_call_stats()
  
      actor = ThreadedActor.options(max_concurrency=3).remote()
      refs = [actor.func.remote() for _ in range(6)]
      ready, _ = ray.wait(refs, timeout=1)
      assert len(ready) == 0
      signal.send.remote()
      results = ray.get(refs)
      assert (
          max(
              result["ThreadedActor.func"]["running"]
              for result in results
          )
          > 1
      )
      assert (
          max(
              result["ThreadedActor.func"]["pending"]
              for result in results
          )
          > 1
      )
  
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 7 for calling a global function with example usage: test_actor_stats_threaded_actor(ray_start_regular) and returns: ray