code: def test_drop_duplicates():
      rs = np.random.RandomState(0)
      raw = pd.DataFrame(
          rs.randint(1000, size=(20, 7)),
          columns=["c" + str(i + 1) for i in range(7)],
      )
      raw["c7"] = [f"s{j}" for j in range(20)]
  
      df = from_pandas_df(raw, chunk_size=10)
      with pytest.raises(ValueError):
          df.drop_duplicates(method="unknown")
      with pytest.raises(KeyError):
          df.drop_duplicates(subset="c8")
  
      # test auto method selection
      assert tile(df.drop_duplicates()).chunks[0].op.method == "tree"
      # subset size less than chunk_store_limit
      assert (
          tile(df.drop_duplicates(subset=["c1", "c3"]))
          .chunks[0]
          .op.method
          == "subset_tree"
      )
      with option_context({"chunk_store_limit": 5}):
          # subset size greater than chunk_store_limit
          assert (
              tile(df.drop_duplicates(subset=["c1", "c3"]))
              .chunks[0]
              .op.method
              == "tree"
          )
      assert (
          tile(df.drop_duplicates(subset=["c1", "c7"]))
          .chunks[0]
          .op.method
          == "tree"
      )
      assert (
          tile(df["c7"].drop_duplicates()).chunks[0].op.method == "tree"
      )
  
      s = df["c7"]
      with pytest.raises(ValueError):
          s.drop_duplicates(method="unknown")
  
imports: from typing import List, Union
  import numpy
  import pandas
  import pytest
  from ....None import opcodes
  from ....config import options, option_context
  from ....core import OutputType, tile, Tileable
  from ....core.graph import TileableGraph, TileableGraphBuilder, TileContext, ChunkGraphBuilder
  from ....core.operand import OperandStage
  from ....tensor.core import TENSOR_TYPE
  from ...None import eval, cut, get_dummies, to_numeric
  from ...core import DATAFRAME_TYPE, SERIES_TYPE, SERIES_CHUNK_TYPE, INDEX_TYPE, CATEGORICAL_TYPE, CATEGORICAL_CHUNK_TYPE, DataFrameData, SeriesData
  from ...datasource.dataframe import from_pandas
  from ...datasource.series import from_pandas
  from ...datasource.index import from_pandas
  from ..None import to_gpu, to_cpu, astype
label_desc: Use image node_id 17 for calling a global function with example usage: test_drop_duplicates() without return types