code: def test_omp_num_threads_in_pg(ray_start_cluster):
      cluster = ray_start_cluster
      cluster.add_node(num_cpus=3)
      ray.init(address=cluster.address)
  
      @ray.remote(num_cpus=3)
      def test_omp_num_threads():
          omp_threads = os.environ["OMP_NUM_THREADS"]
          return int(omp_threads)
  
      assert ray.get(test_omp_num_threads.remote()) == 3
  
      pg = ray.util.placement_group(bundles=[{"CPU": 3}])
      ray.get(pg.ready())
  
      ref = test_omp_num_threads.options(
          scheduling_strategy=PlacementGroupSchedulingStrategy(
              placement_group=pg
          )
      ).remote()
      assert ray.get(ref) == 3
  
      ref = test_omp_num_threads.options(
          scheduling_strategy=PlacementGroupSchedulingStrategy(
              placement_group=pg, placement_group_bundle_index=0
          )
      ).remote()
      assert ray.get(ref) == 3
  
imports: import sys
  import warnings
  import os
  import pytest
  import ray
  from ray._private.utils import get_ray_doc_version
  import ray.cluster_utils
  from ray._private.test_utils import placement_group_assert_no_leak
  from ray._private.test_utils import skip_flaky_core_test_premerge
  from ray.util.client.ray_client_helpers import connect_to_client_or_not
  from ray.util.scheduling_strategies import PlacementGroupSchedulingStrategy
label_desc: Use image node_id 16 for calling a global function with example usage: test_omp_num_threads_in_pg(ray_start_cluster) and returns: int