code: def test_gpu_execution(setup_gpu):
      # test sort_values
      rs = np.random.RandomState(0)
      distinct_opts = (
          ["0"]
          if sys.platform.lower().startswith("win")
          else ["0", "1"]
      )
      for add_distinct in distinct_opts:
          os.environ["PSRS_DISTINCT_COL"] = add_distinct
  
          # test dataframe
          raw = pd.DataFrame(
              rs.rand(100, 10),
              columns=["a" + str(i) for i in range(10)],
          )
          mdf = DataFrame(raw, chunk_size=30).to_gpu()
  
          result = mdf.sort_values(by="a0").execute().fetch()
          expected = raw.sort_values(by="a0")
          pd.testing.assert_frame_equal(result.to_pandas(), expected)
  
          # test series
          raw = pd.Series(rs.rand(10))
          series = Series(raw).to_gpu()
  
          result = series.sort_values().execute().fetch()
          expected = raw.sort_values()
          pd.testing.assert_series_equal(result.to_pandas(), expected)
  
      # test DataFrame.sort_index
      raw = pd.DataFrame(
          np.random.rand(10, 10), columns=np.random.rand(10)
      )
      mdf = DataFrame(raw).to_gpu()
  
      result = mdf.sort_index().execute().fetch()
      expected = raw.sort_index()
      pd.testing.assert_frame_equal(result.to_pandas(), expected)
  
      # test Series.sort_index
      raw = pd.Series(
          np.random.rand(10),
          index=np.random.rand(10),
      )
      series = Series(raw).to_gpu()
  
      result = series.sort_index().execute().fetch()
      expected = raw.sort_index()
      pd.testing.assert_series_equal(result.to_pandas(), expected)
  
file_path: mars/mars/dataframe/sort/tests/test_sort_execution.py
imports: import os
  import sys
  import numpy
  import pandas
  import pytest
  from ....tests.core import require_cudf
  from ...None import DataFrame, Series, ArrowStringDtype
label_desc: Use image node_id 4 for calling a global function with example usage: test_gpu_execution(setup_gpu) without return types