code: def test_e2e(ray_start_4_cpus, resource_manager_cls, errors):
      actor_manager = RayActorManager(
          resource_manager=resource_manager_cls()
      )
  
      if errors and isinstance(errors, str):
          errors = [errors]
  
      flow = TuneFlow(actor_manager=actor_manager, errors=errors)
      flow.run()
  
      results = flow.get_results()
  
      assert all(res[-1] == 10 for res in results.values()), results
  
imports: import random
  from collections import defaultdict
  from typing import Dict, List, Optional
  import pytest
  import ray
  from ray.air import ResourceRequest
  from ray.air.execution import FixedResourceManager, PlacementGroupResourceManager
  from ray.air.execution._internal.actor_manager import RayActorManager
  from ray.air.execution._internal.tracked_actor import TrackedActor
  from ray.exceptions import RayActorError
label_desc: Use image node_id 2 for calling a global function with example usage: test_e2e(ray_start_4_cpus, resource_manager_cls, errors) without return types