code: def test_show_duplicates(unittest):
      import dtale.global_state as global_state
  
      global_state.clear_store()
      data_id, duplicates_type = "1", "show"
      data = {data_id: duplicates_data()}
      build_data_inst(data)
  
      builder = DuplicateCheck(
          data_id, duplicates_type, {"group": ["foo"]}
      )
      unittest.assertEqual(builder.test(), {})
      with pytest.raises(NoDuplicatesToShowException):
          builder.execute()
  
      data = {data_id: duplicates_data()}
      build_data_inst(data)
  
      builder = DuplicateCheck(
          data_id, duplicates_type, {"group": ["foO", "bar"]}
      )
      unittest.assertEqual(
          builder.test(),
          {
              "4, 5": dict(count=3, filter=["4", "5"]),
              "4, 6": dict(count=2, filter=["4", "6"]),
          },
      )
      new_data_id = builder.execute()
      assert new_data_id == str(2)
      unittest.assertEqual(
          global_state.get_data(new_data_id)["Foo"].tolist(),
          [1, 2, 3, 4, 5],
      )
  
      data = {data_id: duplicates_data()}
      build_data_inst(data)
  
      builder = DuplicateCheck(
          data_id,
          duplicates_type,
          {"group": ["foO", "bar"], "filter": ["4", "5"]},
      )
      new_data_id = builder.execute()
      unittest.assertEqual(
          global_state.get_data(new_data_id)["Foo"].tolist(), [1, 2, 3]
      )
  
file_path: dtale/tests/dtale/test_duplicates.py
imports: import json
  import pandas
  import pytest
  from dtale.duplicate_checks import DuplicateCheck, NoDuplicatesException, NoDuplicatesToShowException, RemoveAllDataException
  from tests.dtale.test_views import app
  from tests.dtale import build_data_inst, build_dtypes
label_desc: Use image node_id 6 for calling a global function with example usage: test_show_duplicates(unittest) without return types