docstr: Suggests fill-ins based on a masked language model
  
  Parameters
  ----------
  templates : str, list, tuple, or dict
      On leaves: templates with {tags}, which will be substituted for mapping in **kwargs
      Must have at least one {mask}. Cannot have {mask} and {mask1}, but can have multiple {mask}s
  return_score : bool
      If True, returns tuples of (word, score)
  **kwargs : type
      See documentation for function 'template'
  
  Returns
  -------
  list(str or tuple)
      list of fill-in suggestions, sorted by likelihood
      (with likelihood if return_score=True)
docstr_tok: ["Suggests","fill-ins","based","on","a","masked","language","model","Parameters","--","--","--","--","--","templates",":","str",",","list",",","tuple",",","or","dict","On","leaves",":","templates","with","{","tags","}",",","which","will","be","substituted","for","mapping","in","*","*","kwargs","Must","have","at","least","one","{","mask","}",".","Can","not","have","{","mask","}","and","{","mask1","}",",","but","can","have","multiple","{","mask","}","s","return_score",":","bool","If","True",",","returns","tuples","of","(","word",",","score",")","*","*","kwargs",":","type","See","documentation","for","function","'template'","Returns","--","--","--","-","list","(","str","or","tuple",")","list","of","fill-in","suggestions",",","sorted","by","likelihood","(","with","likelihood","if","return_score=True",")"]
code: def suggest(self, templates, return_score=False, **kwargs):
      """Suggests fill-ins based on a masked language model
  
      Parameters
      ----------
      templates : str, list, tuple, or dict
          On leaves: templates with {tags}, which will be substituted for mapping in **kwargs
          Must have at least one {mask}. Cannot have {mask} and {mask1}, but can have multiple {mask}s
      return_score : bool
          If True, returns tuples of (word, score)
      **kwargs : type
          See documentation for function 'template'
  
      Returns
      -------
      list(str or tuple)
          list of fill-in suggestions, sorted by likelihood
          (with likelihood if return_score=True)
  
      """
      mask_index, ops = get_mask_index(templates)
      if not mask_index:
          return []
      if len(mask_index) != 1:
          raise Exception("Only one mask index is allowed")
      ret = self.template(templates, **kwargs, mask_only=True)
      xs = [tuple(x[0]) if len(x[0]) > 1 else x[0][0] for x in ret]
      if return_score:
          scores = [x[2] for x in ret]
          xs = list(zip(xs, scores))
      if kwargs.get("verbose", False):
          print(
              "\n".join(
                  ["%6s %s" % ("%.2f" % x[2], x[1]) for x in ret[:5]]
              )
          )
      return xs
  
imports: import collections
  import itertools
  import string
  import numpy
  import re
  import copy
  import os
  import json
  import munch
  import pickle
  import csv
  from .viewer.template_editor import TemplateEditor
  from .multilingual import multilingual_params, get_language_code
label_desc: Use image node_id 11 for calling the Editor obj's underlying member method code with example usage: obj.suggest(templates, return_score) and returns: xs, list