code: def test_nested_functions(ray_start_shared_local_modes):
      # Make sure that remote functions can use other values that are defined
      # after the remote function but before the first function invocation.
      @ray.remote
      def f():
          return g(), ray.get(h.remote())
  
      def g():
          return 1
  
      @ray.remote
      def h():
          return 2
  
      assert ray.get(f.remote()) == (1, 2)
  
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 18 for calling a global function with example usage: test_nested_functions(ray_start_shared_local_modes) and returns: g,  ray, int, int