code: def test_actor_autocomplete(ray_start_regular_shared):
      """
      Test that autocomplete works with actors by checking that the builtin dir()
      function works as expected.
      """
  
      @ray.remote
      class Foo:
          def method_one(self) -> None:
              pass
  
      class_calls = [fn for fn in dir(Foo) if not fn.startswith("_")]
  
      assert set(class_calls) == {
          "method_one",
          "options",
          "remote",
          "bind",
      }
  
      f = Foo.remote()
  
      methods = [fn for fn in dir(f) if not fn.startswith("_")]
      assert methods == ["method_one"]
  
      all_methods = set(dir(f))
      assert all_methods == {
          "__init__",
          "method_one",
          "__ray_ready__",
          "__ray_call__",
          "__ray_terminate__",
      }
  
      method_options = [
          fn for fn in dir(f.method_one) if not fn.startswith("_")
      ]
  
      if client_test_enabled():
          assert set(method_options) == {"options", "remote"}
      else:
          assert set(method_options) == {"options", "remote", "bind"}
  
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 44 for calling a global function with example usage: test_actor_autocomplete(ray_start_regular_shared) without return types