docstr: Test synchronous remote calls to all actors, regardless of their states.
docstr_tok: ["Test","synchronous","remote","calls","to","all","actors",",","regardless","of","their","states","."]
code: def test_sync_call_all_actors(self):
      """Test synchronous remote calls to all actors, regardless of their states."""
      actors = [Actor.remote(i) for i in range(4)]
      manager = FaultTolerantActorManager(actors=actors)
  
      results = []
      for _ in range(10):
          # Make sure we have latest states of all actors.
          results.extend(
              manager.foreach_actor(
                  lambda w: w.call(), healthy_only=False
              )
          )
          # Wait for actors to recover.
          wait_for_restore()
  
      # We fired against all actors regardless of their status.
      # So we should get 40 results back.
      self.assertEqual(len(results), 40)
  
      # Since the actors are always restored before next round of calls,
      # we should get more results back.
      # Some of these calls still failed, but 15 good results in total.
      # Note that we can hardcode 15 here because we are using deterministic
      # sequences of random numbers.
      self.assertEqual(len([r for r in results if r.ok]), 15)
  
      manager.clear()
  
imports: import functools
  import os
  from pathlib import Path
  import pickle
  import sys
  import time
  import unittest
  import ray
  from ray.util.state import list_actors
  from ray.rllib.utils.actor_manager import FaultAwareApply, FaultTolerantActorManager
label_desc: Use image node_id 4 for calling the TestActorManager obj's underlying member method code with example usage: obj.test_sync_call_all_actors() without return types