code: def tokenize_df(
      df,
      text_cols,
      n_workers=defaults.cpus,
      rules=None,
      mark_fields=None,
      tok=None,
      tok_text_col="text",
  ):
      "Tokenize texts in `df[text_cols]` in parallel using `n_workers` and stores them in `df[tok_text_col]`"
      text_cols = [
          df.columns[c] if isinstance(c, int) else c
          for c in L(text_cols)
      ]
      # mark_fields defaults to False if there is one column of texts, True if there are multiple
      if mark_fields is None:
          mark_fields = len(text_cols) > 1
      rules = L(ifnone(rules, defaults.text_proc_rules.copy()))
      texts = _join_texts(df[text_cols], mark_fields=mark_fields)
      outputs = (
          L(parallel_tokenize(texts, tok, rules, n_workers=n_workers))
          .sorted()
          .itemgot(1)
      )
  
      other_cols = df.columns[~df.columns.isin(text_cols)]
      res = df[other_cols].copy()
      res[tok_text_col] = outputs
      res[f"{tok_text_col}_length"] = [len(o) for o in outputs]
      return res, Counter(outputs.concat())
  
imports: from __future__ import annotations
  from ..torch_basics import *
  from ..data.all import *
  import html
label_desc: Use image node_id 17 for calling a global function with example usage: tokenize_df(df, text_cols, n_workers, rules, mark_fields, tok, tok_text_col) and returns: res,  Counter