code: def test_submit_with_tls(use_tls):
      run_string_as_driver(
          """
  import ray
  ray.init(num_cpus=2, num_gpus=1, resources={"Custom": 1})
  
  @ray.remote
  def f(n):
      return list(range(n))
  
  id1, id2, id3 = f._remote(args=[3], num_returns=3)
  assert ray.get([id1, id2, id3]) == [0, 1, 2]
  
  @ray.remote
  class Actor:
      def __init__(self, x, y=0):
          self.x = x
          self.y = y
  
      def method(self, a, b=0):
          return self.x, self.y, a, b
  
  a = Actor._remote(
      args=[0], kwargs={"y": 1}, num_gpus=1, resources={"Custom": 1})
  
  id1, id2, id3, id4 = a.method._remote(
      args=["test"], kwargs={"b": 2}, num_returns=4)
  assert ray.get([id1, id2, id3, id4]) == [0, 1, "test", 2]
      """,
          env=build_env(),
      )
  
file_path: ray/python/ray/tests/test_tls_auth.py
imports: import logging
  import os
  import sys
  import subprocess
  import pytest
  from ray._private.test_utils import run_string_as_driver
label_desc: Use image node_id 4 for calling a global function with example usage: test_submit_with_tls(use_tls) without return types