code: def test_pivot_table():
      test_df = pd.DataFrame(
          {
              "A": [
                  "foo",
                  "foo",
                  "foo",
                  "foo",
                  "foo",
                  "bar",
                  "bar",
                  "bar",
                  "bar",
              ],
              "B": [
                  "one",
                  "one",
                  "one",
                  "two",
                  "two",
                  "one",
                  "one",
                  "two",
                  "two",
              ],
              "C": [
                  "small",
                  "large",
                  "large",
                  "small",
                  "small",
                  "large",
                  "small",
                  "small",
                  "large",
              ],
              "D": [1, 2, 2, 3, 3, 4, 5, 6, 7],
              "E": [2, 4, 5, 5, 6, 6, 8, 9, 9],
          }
      )
  
      df = pd.pivot_table(
          test_df,
          values="D",
          index=["A", "B"],
          columns=["C"],
          aggfunc=np.sum,
      )
      assert isinstance(df, pd.DataFrame)
  
      with pytest.raises(ValueError):
          pd.pivot_table(
              test_df["C"],
              values="D",
              index=["A", "B"],
              columns=["C"],
              aggfunc=np.sum,
          )
  
file_path: ray/python/ray/tests/modin/test_modin.py
imports: import sys
  import pytest
  import pandas
  import numpy
  from numpy.testing import assert_array_equal
  from ray.tests.conftest import ray_start_regular_shared
label_desc: Use image node_id 8 for calling a global function with example usage: test_pivot_table() without return types