code: def test_transform_shards_with_actors(orca_context_fixture):
      import random
  
      ray_xshards, ndarray_dict = get_ray_xshards()
      ndarray_dict_mapped = {
          k: value + 1 for k, value in ndarray_dict.items()
      }
      num_partitions = ray_xshards.num_partitions()
  
      num_actors = random.randint(1, num_partitions)
      actors = [Add1Actor.remote() for _ in range(num_actors)]
      map_func = lambda actor, part_ref: actor.add_one.remote(part_ref)
      result_xshards = ray_xshards.transform_shards_with_actors(
          actors, map_func
      )
      results = result_xshards.collect()
      verify_collect_results(results, ndarray_dict_mapped)
  
file_path: BigDL/python/orca/test/bigdl/orca/data/ray/test_ray_xshards.py
imports: import pytest
  import ray
  from bigdl.orca.data.ray_xshards import RayXShards
label_desc: Use image node_id 7 for calling a global function with example usage: test_transform_shards_with_actors(orca_context_fixture) without return types