code: def test_data_duplicates_categorical_dtypes():
      """We used to have a bug when using groupby on category dtypes, this test ensures it doesn't return"""
      data = {
          "a": np.random.randint(0, 1000, 300000),
          "b": np.random.randint(0, 1000, 300000),
          "c": np.random.randint(0, 1000, 300000),
          "d": np.random.randint(0, 1000, 300000),
          "e": np.random.randint(0, 1000, 300000),
      }
      duplicate_data = pd.DataFrame(data).astype("category")
      check_obj = DataDuplicates()
      assert_that(
          check_obj.run(duplicate_data).value, close_to(0.0, 0.001)
      )
  
file_path: deepchecks/tests/tabular/checks/integrity/data_duplicate_test.py
imports: import numpy
  import pandas
  from hamcrest import assert_that, calling, close_to, equal_to, has_items, has_length, raises
  from deepchecks.core import ConditionCategory
  from deepchecks.core.errors import DeepchecksValueError
  from deepchecks.tabular.checks.data_integrity.data_duplicates import DataDuplicates
  from tests.base.utils import equal_condition_result
label_desc: Use image node_id 2 for calling a global function with example usage: test_data_duplicates_categorical_dtypes() without return types