class_docstr: Use Bert to generate words.
  
  Example::
  
      小明喜欢看书 -> 小明喜欢看报纸
docstr: In this function, because there is only one deformation mode, only one
  set of outputs is output.
  
  :param ~textflint.CWSSample sample: the data which need be changed
  :param **kwargs:
  :return: trans_sample a list of sample
docstr_tok: ["In","this","function",",","because","there","is","only","one","deformation","mode",",","only","one","set","of","outputs","is","output",".",":","param","~textflint.CWSSample","sample",":","the","data","which","need","be","changed",":","param","*","*","kwargs",":",":","return",":","trans_sample","a","list","of","sample"]
code: def _transform(self, sample, n=1, **kwargs):
      r"""
      In this function, because there is only one deformation mode, only one
      set of outputs is output.
  
      :param ~textflint.CWSSample sample: the data which need be changed
      :param **kwargs:
      :return: trans_sample a list of sample
  
      """
      # get sentence label and pos tag
      origin_sentence = sample.get_value("x")
      origin_label = sample.get_value("y")
      pos_tags = sample.pos_tags
      x, y, mask = self._get_transformations(
          origin_sentence, origin_label, pos_tags, sample.mask
      )
      if x == origin_sentence:
          return []
      x = CnTextField(x, mask)
      return [sample.update(x, y)]
  
file_path: textflint/textflint/generation/transformation/CWS/cn_mlm.py
imports: import torch
  from transformers import BertTokenizer, BertForMaskedLM
  from ..transformation import Transformation
  from ....input.component.field.cn_text_field import CnTextField
  from ....common.preprocess.cn_processor import CnProcessor
  from ....common.settings import ORIGIN, MODIFIED_MASK
label_desc: Use image node_id 3 for calling the CnMLM obj's underlying member method code with example usage: obj._transform(sample, n) and returns: list, list