code: def test_pivot_duplicate_error():
      gdf = cudf.DataFrame(
          {"a": [0, 1, 2, 2], "b": [1, 2, 3, 3], "d": [1, 2, 3, 4]}
      )
      with pytest.raises(ValueError):
          gdf.pivot(index="a", columns="b")
      with pytest.raises(ValueError):
          gdf.pivot(index="b", columns="a")
  
imports: import re
  from itertools import chain
  import numpy
  import pandas
  import pytest
  import cudf
  from cudf import melt
  from cudf.core.buffer.spill_manager import get_global_manager
  from cudf.testing._utils import ALL_TYPES, DATETIME_TYPES, NUMERIC_TYPES, assert_eq
label_desc: Use image node_id 21 for calling a global function with example usage: test_pivot_duplicate_error() without return types