code: def test_local(self):
      @ray.remote
      class TestRay:
          def hostname(self):
              import socket
  
              return socket.gethostname()
  
      sc = init_spark_on_local(cores=8)
      ray_ctx = RayContext(
          sc=sc, object_store_memory="1g", ray_node_cpu_cores=4
      )
      address_info = ray_ctx.init()
      assert "object_store_address" in address_info
      actors = [TestRay.remote() for i in range(0, 4)]
      print(ray.get([actor.hostname.remote() for actor in actors]))
      ray_ctx.stop()
      sc.stop()
  
file_path: analytics-zoo/pyzoo/test/zoo/ray/test_ray_on_local.py
imports: from unittest import TestCase
  import pytest
  import ray
  from zoo import init_spark_on_local
  from zoo.ray import RayContext
label_desc: Use image node_id 1 for calling the TestRayLocal obj's underlying member method code with example usage: obj.test_local() and returns: socket