code: def test_drop_duplicates():
      pdf = pd.DataFrame(
          {
              "AAA": [
                  "foo",
                  "bar",
                  "foo",
                  "bar",
                  "foo",
                  "bar",
                  "bar",
                  "foo",
              ],
              "B": [
                  "one",
                  "one",
                  "two",
                  "two",
                  "two",
                  "two",
                  "one",
                  "two",
              ],
              "C": [1, 1, 2, 2, 2, 2, 1, 2],
              "D": range(8),
          }
      )
      gdf = cudf.DataFrame.from_pandas(pdf)
      # single column
      result = gdf.copy()
      result.drop_duplicates("AAA", inplace=True)
      expected = pdf.copy()
      expected.drop_duplicates("AAA", inplace=True)
      assert_df(result, expected)
  
      result = gdf.drop_duplicates("AAA", keep="last")
      expected = pdf.drop_duplicates("AAA", keep="last")
      assert_df(result, expected)
  
      result = gdf.drop_duplicates("AAA", keep=False)
      expected = pdf.drop_duplicates("AAA", keep=False)
      assert_df(result, expected)
      assert len(result) == 0
  
      # multi column
      expected = pdf.loc[[0, 1, 2, 3]]
      result = gdf.drop_duplicates(np.array(["AAA", "B"]))
      assert_df(result, expected)
      result = pdf.drop_duplicates(np.array(["AAA", "B"]))
      assert_df(result, expected)
  
      result = gdf.drop_duplicates(("AAA", "B"), keep="last")
      expected = pdf.drop_duplicates(("AAA", "B"), keep="last")
      assert_df(result, expected)
  
      result = gdf.drop_duplicates(("AAA", "B"), keep=False)
      expected = pdf.drop_duplicates(("AAA", "B"), keep=False)
      assert_df(result, expected)
  
      # consider everything
      df2 = gdf.loc[:, ["AAA", "B", "C"]]
  
      result = df2.drop_duplicates()
      # in this case only
      expected = df2.drop_duplicates(["AAA", "B"])
      assert_df(result, expected)
  
      result = df2.drop_duplicates(keep="last")
      expected = df2.drop_duplicates(["AAA", "B"], keep="last")
      assert_df(result, expected)
  
      result = df2.drop_duplicates(keep=False)
      expected = df2.drop_duplicates(["AAA", "B"], keep=False)
      assert_df(result, expected)
  
      # integers
      result = gdf.drop_duplicates("C")
      expected = pdf.drop_duplicates("C")
      assert_df(result, expected)
      result = gdf.drop_duplicates("C", keep="last")
      expected = pdf.drop_duplicates("C", keep="last")
      assert_df(result, expected)
  
      gdf["E"] = gdf["C"].astype("int8")
      result = gdf.drop_duplicates("E")
      pdf["E"] = pdf["C"].astype("int8")
      expected = pdf.drop_duplicates("E")
      assert_df(result, expected)
      result = gdf.drop_duplicates("E", keep="last")
      expected = pdf.drop_duplicates("E", keep="last")
      assert_df(result, expected)
  
      pdf = pd.DataFrame(
          {"x": [7, 6, 3, 3, 4, 8, 0], "y": [0, 6, 5, 5, 9, 1, 2]}
      )
      gdf = cudf.DataFrame.from_pandas(pdf)
      assert_df(gdf.drop_duplicates(), pdf.drop_duplicates())
  
      pdf = pd.DataFrame([[1, 0], [0, 2]])
      gdf = cudf.DataFrame.from_pandas(pdf)
      assert_df(gdf.drop_duplicates(), pdf.drop_duplicates())
  
      pdf = pd.DataFrame([[-2, 0], [0, -4]])
      gdf = cudf.DataFrame.from_pandas(pdf)
      assert_df(gdf.drop_duplicates(), pdf.drop_duplicates())
  
      x = np.iinfo(np.int64).max / 3 * 2
      pdf = pd.DataFrame([[-x, x], [0, x + 4]])
      gdf = cudf.DataFrame.from_pandas(pdf)
      assert_df(gdf.drop_duplicates(), pdf.drop_duplicates())
  
      pdf = pd.DataFrame([[-x, x], [x, x + 4]])
      gdf = cudf.DataFrame.from_pandas(pdf)
      assert_df(gdf.drop_duplicates(), pdf.drop_duplicates())
  
      pdf = pd.DataFrame([i] * 9 for i in range(16))
      pdf = pd.concat(
          [pdf, pd.DataFrame([[1] + [0] * 8])], ignore_index=True
      )
      gdf = cudf.DataFrame.from_pandas(pdf)
      assert_df(gdf.drop_duplicates(), pdf.drop_duplicates())
  
imports: import itertools
  import random
  import numpy
  import pandas
  import pytest
  import cudf
  from cudf import concat
  from cudf.testing._utils import _create_pandas_series_float64_default, assert_eq, assert_exceptions_equal
label_desc: Use image node_id 5 for calling a global function with example usage: test_drop_duplicates() without return types