code: def test_substring():
      df = pd.DataFrame(dict(a=["aaaaa", "bbbbbbb", "ccccccccc"]))
  
      data_id, column_type = "1", "substring"
      build_data_inst({data_id: df})
  
      builder = ColumnBuilder(
          data_id,
          column_type,
          "Col1",
          {"col": "a", "start": 0, "end": 3},
      )
      verify_builder(
          builder, lambda col: list(col.values) == ["aaa", "bbb", "ccc"]
      )
  
      builder = ColumnBuilder(
          data_id,
          column_type,
          "Col1",
          {"col": "a", "start": 5, "end": 6},
      )
      verify_builder(
          builder, lambda col: list(col.values) == ["", "b", "c"]
      )
  
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 8 for calling a global function with example usage: test_substring() without return types