code: def test_args_starkwargs(ray_start_shared_local_modes):
      def starkwargs(a, b, **kwargs):
          return a, b, kwargs
  
      class TestActor:
          def starkwargs(self, a, b, **kwargs):
              return a, b, kwargs
  
      def test_function(fn, remote_fn):
          assert fn(1, 2, x=3) == ray.get(remote_fn.remote(1, 2, x=3))
          with pytest.raises(TypeError):
              remote_fn.remote(3)
  
      remote_test_function = ray.remote(test_function)
  
      remote_starkwargs = ray.remote(starkwargs)
      test_function(starkwargs, remote_starkwargs)
      ray.get(
          remote_test_function.remote(starkwargs, remote_starkwargs)
      )
  
      remote_actor_class = ray.remote(TestActor)
      remote_actor = remote_actor_class.remote()
      actor_method = remote_actor.starkwargs
      local_actor = TestActor()
      local_method = local_actor.starkwargs
      test_function(local_method, actor_method)
      ray.get(remote_test_function.remote(local_method, actor_method))
  
imports: import logging
  import os
  import pickle
  import random
  import sys
  import time
  import pytest
  import ray
  import ray.cluster_utils
  from ray._private.test_utils import SignalActor, client_test_enabled, get_error_message, run_string_as_driver
label_desc: Use image node_id 25 for calling a global function with example usage: test_args_starkwargs(ray_start_shared_local_modes) and returns: a,  b,  kwargs, a,  b,  kwargs