code: def test_string(unittest):
      df = replacements_data()
      data_id, replacement_type = "1", "strings"
      build_data_inst({data_id: df})
  
      cfg = {"value": "unknown", "ignoreCase": True, "isChar": False}
      builder = ColumnReplacement(data_id, "a", replacement_type, cfg)
      verify_builder(
          builder,
          lambda col: unittest.assertEqual(
              list(col.values), ["a", np.nan, "b"]
          ),
      )
  
      cfg = {"value": "unknown", "ignoreCase": False, "isChar": False}
      builder = ColumnReplacement(data_id, "a", replacement_type, cfg)
      verify_builder(
          builder,
          lambda col: unittest.assertEqual(
              list(col.values), ["a", "UNknown", "b"]
          ),
      )
  
      cfg = {
          "value": "unknown",
          "ignoreCase": True,
          "isChar": False,
          "replace": "missing",
      }
      builder = ColumnReplacement(data_id, "a", replacement_type, cfg)
      verify_builder(
          builder,
          lambda col: unittest.assertEqual(
              list(col.values), ["a", "missing", "b"]
          ),
      )
  
      cfg = {"value": "-", "ignoreCase": True, "isChar": True}
      builder = ColumnReplacement(data_id, "b", replacement_type, cfg)
      verify_builder(
          builder,
          lambda col: unittest.assertEqual(
              list(col.values), ["", " ", np.nan]
          ),
      )
  
      cfg = {
          "value": "-",
          "ignoreCase": True,
          "isChar": True,
          "replace": "missing",
      }
      builder = ColumnReplacement(data_id, "b", replacement_type, cfg)
      verify_builder(
          builder,
          lambda col: unittest.assertEqual(
              list(col.values), ["", " ", "missing"]
          ),
      )
  
file_path: dtale/tests/dtale/test_replacements.py
imports: import json
  import numpy
  import pandas
  import pytest
  import sklearn
  from pkg_resources import parse_version
  from six import PY3
  from dtale.column_replacements import ColumnReplacement
  from tests.dtale.test_views import app
  from tests.dtale import build_data_inst, build_dtypes
label_desc: Use image node_id 4 for calling a global function with example usage: test_string(unittest) without return types