code: def test_instantiate(self):
      bad = PreTokenizer.custom(
          TestCustomPreTokenizer.BadCustomPretok()
      )
      good = PreTokenizer.custom(
          TestCustomPreTokenizer.GoodCustomPretok()
      )
  
      assert isinstance(bad, PreTokenizer)
      assert isinstance(good, PreTokenizer)
      with pytest.raises(Exception, match="TypeError:.*pre_tokenize()"):
          bad.pre_tokenize_str("Hey there!")
      assert good.pre_tokenize_str("Hey there!") == [
          ("Hey there!", (0, 10)),
          ("Hey there!", (0, 10)),
      ]
  
imports: import json
  import pickle
  import pytest
  from tokenizers.pre_tokenizers import BertPreTokenizer, ByteLevel, CharDelimiterSplit, Digits, Metaspace, PreTokenizer, Punctuation, Sequence, Split, UnicodeScripts, Whitespace, WhitespaceSplit
label_desc: Use image node_id 1 for calling the TestCustomPreTokenizer obj's underlying member method code with example usage: obj.test_instantiate() without return types