code: def custom_en_tokenizer(en_vocab):
      prefix_re = compile_prefix_regex(English.Defaults.prefixes)
      suffix_re = compile_suffix_regex(English.Defaults.suffixes)
      custom_infixes = [
          r"\.\.\.+",
          r"(?<=[0-9])-(?=[0-9])",
          r"[0-9]+(,[0-9]+)+",
          r"[\[\]!&:,()\*—–\/-]",
      ]
      infix_re = compile_infix_regex(custom_infixes)
      token_match_re = re.compile("a-b")
      return Tokenizer(
          en_vocab,
          English.Defaults.tokenizer_exceptions,
          prefix_re.search,
          suffix_re.search,
          infix_re.finditer,
          token_match=token_match_re.match,
      )
  
file_path: spaCy/spacy/tests/lang/en/test_customized_tokenizer.py
imports: import re
  import pytest
  from spacy.lang.en import English
  from spacy.tokenizer import Tokenizer
  from spacy.util import compile_infix_regex, compile_prefix_regex, compile_suffix_regex
label_desc: Use image node_id 1 for calling a global function with example usage: custom_en_tokenizer(en_vocab) and returns: Tokenizer