code: def test_get_spark_task_assigned_physical_gpus():
      with patch.dict(os.environ, {}, clear=True):
          assert get_spark_task_assigned_physical_gpus([2, 5]) == [2, 5]
  
      with patch.dict(
          os.environ, {"CUDA_VISIBLE_DEVICES": "2,3,6"}, clear=True
      ):
          assert get_spark_task_assigned_physical_gpus([0, 1]) == [2, 3]
          assert get_spark_task_assigned_physical_gpus([0, 2]) == [2, 6]
  
file_path: ray/python/ray/tests/spark/test_utils.py
imports: from unittest.mock import patch
  import os
  import re
  import sys
  import pytest
  from ray.util.spark.utils import get_spark_task_assigned_physical_gpus, _calc_mem_per_ray_worker_node, _get_avail_mem_per_ray_worker_node
  from ray.util.spark.cluster_init import _convert_ray_node_options, _verify_node_options, _append_default_spilling_dir_config
label_desc: Use image node_id 1 for calling a global function with example usage: test_get_spark_task_assigned_physical_gpus() without return types