class_docstr: An example widget.
class_docstr_tok: ["An","example","widget","."]
code: def __init__(
      self,
      template_strs: typing.List[str],
      tagged_keys: typing.List[str],
      tag_dict: typing.Dict[str, str],
      mask_suggests: typing.List[typing.Union[str, tuple]],
      format_fn: typing.Callable,
      select_suggests_fn: typing.Callable,
      tokenizer,
      **kwargs,
  ):
      widgets.DOMWidget.__init__(self, **kwargs)
      self.format_fn = format_fn
      self.select_suggests_fn = select_suggests_fn
      # ONLY do tokenization here
      self.tokenizer = tokenizer
      self.bert_suggests = mask_suggests
      self.templates = [
          self.tokenize_template_str(s, tagged_keys, tag_dict)
          for s in template_strs
      ]
      self.on_msg(self.handle_events)
  
file_path: checklist/checklist/viewer/template_editor.py
imports: import ipywidgets
  from traitlets import Unicode, List, Dict
  import os
  import typing
  import itertools
label_desc: Use image node_id 1 to create a new TemplateEditor object from inherited base classes: widgets with example: obj = TemplateEditor(template_strs, tagged_keys, tag_dict, mask_suggests, format_fn, select_suggests_fn, tokenizer)