code: def test_map_eager(init):
      """Verify that submit is called eagerly when map is called.
  
      If the results are directly yielded, then the submit calls are not
      executed until the results are consumed.
      """
  
      @ray.remote
      class MyActor:
          def f(self, x):
              pass
  
      actor = MyActor.remote()
      pool = ActorPool([actor])
      pool.submit = MagicMock()
  
      pool.map(lambda a, v: a.f.remote(v), range(1))
      pool.submit.assert_called()
  
file_path: ray/python/ray/tests/test_actor_pool.py
imports: import asyncio
  import sys
  import time
  from unittest.mock import MagicMock
  import pytest
  import ray
  from ray.util import ActorPool
label_desc: Use image node_id 5 for calling a global function with example usage: test_map_eager(init) without return types