code: def test_rank_all_arguments(
      pdf, dtype, ascending, method, na_option, pct, numeric_only
  ):
      if method == "first" and dtype == "O":
          # not supported by pandas
          return
  
      pdf = pdf.copy(deep=True)  # for parallel pytest
      if numeric_only:
          pdf["str"] = np.array(
              ["a", "b", "c", "d", "e", "1", "2", "3", "4", "5"]
          )
      gdf = DataFrame.from_pandas(pdf)
  
      kwargs = {
          "method": method,
          "na_option": na_option,
          "ascending": ascending,
          "pct": pct,
          "numeric_only": numeric_only,
      }
  
      # Series
      assert_eq(gdf["col1"].rank(**kwargs), pdf["col1"].rank(**kwargs))
      assert_eq(gdf["col2"].rank(**kwargs), pdf["col2"].rank(**kwargs))
      if numeric_only:
          with pytest.warns(FutureWarning):
              expect = pdf["str"].rank(**kwargs)
          got = gdf["str"].rank(**kwargs)
          assert expect.empty == got.empty
          expected = pdf.select_dtypes(include=np.number)
      else:
          expected = pdf.copy(deep=True)
  
      actual = gdf.rank(**kwargs)
      expected = pdf.rank(**kwargs)
  
      assert_eq(expected, actual)
  
file_path: cudf/python/cudf/cudf/tests/test_rank.py
imports: from itertools import chain, combinations_with_replacement, product
  import numpy
  import pandas
  import pytest
  from cudf import DataFrame
  from cudf.testing._utils import assert_eq, assert_exceptions_equal
label_desc: Use image node_id 2 for calling a global function with example usage: test_rank_all_arguments(pdf, dtype, ascending, method, na_option, pct, numeric_only) without return types