code: def parallel_tokenize(
      items, tok=None, rules=None, n_workers=defaults.cpus, **kwargs
  ):
      "Calls optional `setup` on `tok` before launching `TokenizeWithRules` using `parallel_gen"
      if tok is None:
          tok = WordTokenizer()
      if hasattr(tok, "setup"):
          tok.setup(items, rules)
      return parallel_gen(
          TokenizeWithRules,
          items,
          tok=tok,
          rules=rules,
          n_workers=n_workers,
          **kwargs,
      )
  
imports: from __future__ import annotations
  from ..torch_basics import *
  from ..data.all import *
  import html
label_desc: Use image node_id 11 for calling a global function with example usage: parallel_tokenize(items, tok, rules, n_workers) and returns: parallel_gen