code: def test_similarity():
      df = pd.DataFrame(dict(a=["a", "b", "c"], b=["d", "d", "d"]))
      data_id, column_type = "1", "similarity"
      build_data_inst({data_id: df})
  
      cfg = {
          "left": "a",
          "right": "b",
          "algo": "levenshtein",
          "normalized": False,
      }
      builder = ColumnBuilder(data_id, column_type, "Col1", cfg)
      verify_builder(builder, lambda col: col.values[-1] == 1)
  
      cfg = {
          "left": "a",
          "right": "b",
          "algo": "levenshtein",
          "normalized": True,
      }
      builder = ColumnBuilder(data_id, column_type, "Col1", cfg)
      verify_builder(builder, lambda col: col.values[-1] == 1)
  
      cfg = {
          "left": "a",
          "right": "b",
          "algo": "damerau-leveneshtein",
          "normalized": False,
      }
      builder = ColumnBuilder(data_id, column_type, "Col1", cfg)
      verify_builder(builder, lambda col: col.values[-1] == 1)
  
      cfg = {
          "left": "a",
          "right": "b",
          "algo": "damerau-leveneshtein",
          "normalized": True,
      }
      builder = ColumnBuilder(data_id, column_type, "Col1", cfg)
      verify_builder(builder, lambda col: col.values[-1] == 1)
  
      cfg = {"left": "a", "right": "b", "algo": "jaro-winkler"}
      builder = ColumnBuilder(data_id, column_type, "Col1", cfg)
      verify_builder(builder, lambda col: col.values[-1] == 1)
  
      if PY3:
          cfg = {
              "left": "a",
              "right": "b",
              "algo": "jaccard",
              "k": "4",
              "normalized": False,
          }
          builder = ColumnBuilder(data_id, column_type, "Col1", cfg)
          verify_builder(builder, lambda col: col.values[-1] == 1)
  
          cfg = {
              "left": "a",
              "right": "b",
              "algo": "jaccard",
              "k": "4",
              "normalized": True,
          }
          builder = ColumnBuilder(data_id, column_type, "Col1", cfg)
          verify_builder(builder, lambda col: col.values[-1] == 1)
  
imports: import numpy
  import pandas
  import pytest
  import sklearn
  from numpy.random import randn
  from pkg_resources import parse_version
  from six import PY3
  import dtale.pandas_util
  from dtale.column_builders import ColumnBuilder, ZERO_STD_ERROR
  from tests.dtale import build_data_inst
label_desc: Use image node_id 11 for calling a global function with example usage: test_similarity() without return types