code: def test_max_calls_releases_resources(shutdown_only):
      ray.init(num_cpus=2, num_gpus=1)
  
      @ray.remote(num_cpus=0)
      def g():
          return 0
  
      @ray.remote(num_cpus=1, num_gpus=1, max_calls=1, max_retries=0)
      def f():
          return [g.remote()]
  
      for i in range(10):
          print(i)
          ray.get(f.remote())
  
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 5 for calling a global function with example usage: test_max_calls_releases_resources(shutdown_only) and returns: int, list