code: def test_scheduling_strategy_override():
      def f(*a):
          @ray.remote(num_cpus=1, scheduling_strategy="SPREAD")
          def f():
              pass
  
          @ray.remote(num_cpus=1, scheduling_strategy="SPREAD")
          class Actor:
              def f(self):
                  pass
  
          # SPREAD tasks are not captured by placement groups, so don't warn.
          ray.get(f.remote())
  
          # SPREAD actors are not captured by placement groups, so don't warn.
          a = Actor.remote()
          ray.get(a.f.remote())
  
      tune.run(f, verbose=0)
  
file_path: ray/python/ray/tune/tests/test_warnings.py
imports: import pytest
  import ray
  from ray import tune
  from ray.data.context import DataContext
  from ray.util.scheduling_strategies import PlacementGroupSchedulingStrategy
  from ray.tune.error import TuneError
label_desc: Use image node_id 6 for calling a global function with example usage: test_scheduling_strategy_override() without return types