code: def test_decorator_args(ray_start_regular_shared):
      # This is an invalid way of using the actor decorator.
      with pytest.raises(Exception):
  
          @ray.remote()
          class Actor:
              def __init__(self):
                  pass
  
      # This is an invalid way of using the actor decorator.
      with pytest.raises(Exception):
  
          @ray.remote(invalid_kwarg=0)  # noqa: F811
          class Actor:  # noqa: F811
              def __init__(self):
                  pass
  
      # This is an invalid way of using the actor decorator.
      with pytest.raises(Exception):
  
          @ray.remote(num_cpus=0, invalid_kwarg=0)  # noqa: F811
          class Actor:  # noqa: F811
              def __init__(self):
                  pass
  
      # This is a valid way of using the decorator.
      @ray.remote(num_cpus=1)  # noqa: F811
      class Actor:  # noqa: F811
          def __init__(self):
              pass
  
      # This is a valid way of using the decorator.
      @ray.remote(num_gpus=1)  # noqa: F811
      class Actor:  # noqa: F811
          def __init__(self):
              pass
  
      # This is a valid way of using the decorator.
      @ray.remote(num_cpus=1, num_gpus=1)  # noqa: F811
      class Actor:  # noqa: F811
          def __init__(self):
              pass
  
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 22 for calling a global function with example usage: test_decorator_args(ray_start_regular_shared) without return types