code: def test_view(unittest):
      from dtale.views import build_dtypes_state
      import dtale.global_state as global_state
  
      global_state.clear_store()
      df = duplicates_data()
      with app.test_client() as c:
          data = {c.port: df}
          dtypes = {c.port: build_dtypes_state(df)}
          build_data_inst(data)
          build_dtypes(dtypes)
          resp = c.get(
              "/dtale/duplicates/{}".format(c.port),
              query_string=dict(
                  type="not_implemented",
                  action="execute",
                  cfg=json.dumps({}),
              ),
          )
          response_data = resp.json
          assert (
              response_data["error"]
              == "'not_implemented' duplicate check not implemented yet!"
          )
  
          params = dict(
              type="columns",
              action="test",
              cfg=json.dumps({"keep": "first"}),
          )
          resp = c.get(
              "/dtale/duplicates/{}".format(c.port), query_string=params
          )
          response_data = resp.json
          unittest.assertEqual(
              response_data, {"results": {"Foo": ["foo"]}}
          )
  
          params["action"] = "execute"
          resp = c.get(
              "/dtale/duplicates/{}".format(c.port), query_string=params
          )
          response_data = resp.json
          assert response_data["data_id"] == str(c.port)
  
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 7 for calling a global function with example usage: test_view(unittest) without return types