code: def test_define_actor(ray_start_regular_shared):
      @ray.remote
      class Test:
          def __init__(self, x):
              self.x = x
  
          def f(self, y):
              return self.x + y
  
      t = Test.remote(2)
      assert ray.get(t.f.remote(1)) == 3
  
      # Make sure that calling an actor method directly raises an exception.
      with pytest.raises(Exception):
          t.f(1)
  
imports: import datetime
  import os
  import random
  import sys
  import tempfile
  import numpy
  import pytest
  import ray
  from ray import cloudpickle
  from ray._private import ray_constants
  from ray._private.test_utils import client_test_enabled, wait_for_condition, wait_for_pid_to_exit
  from ray.actor import ActorClassInheritanceException
  from ray.tests.client_test_utils import create_remote_signal_actor
  from ray._private.test_utils import SignalActor
  import setproctitle
label_desc: Use image node_id 28 for calling a global function with example usage: test_define_actor(ray_start_regular_shared) and returns: unknown