class_docstr: A Base class that every transform method should derived from.
class_docstr_tok: ["A","Base","class","that","every","transform","method","should","derived","from","."]
docstr: Apply transform to `example`.
  
  Args:
      example (dict): a dict of field value, ex. src, tgt;
      is_train (bool): Indicate if src/tgt is training data;
      stats (TransformStatistics): a statistic object.
docstr_tok: ["Apply","transform","to","`","example","`",".","Args",":","example","(","dict",")",":","a","dict","of","field","value",",","ex",".","src",",","tgt",";","is_train","(","bool",")",":","Indicate","if","src\/tgt","is","training","data",";","stats","(","TransformStatistics",")",":","a","statistic","object","."]
code: def apply(self, example, is_train=False, stats=None, **kwargs):
      """Apply transform to `example`.
  
      Args:
          example (dict): a dict of field value, ex. src, tgt;
          is_train (bool): Indicate if src/tgt is training data;
          stats (TransformStatistics): a statistic object.
      """
      raise NotImplementedError
  
imports: import torch
  from onmt.utils.logging import logger
  from onmt.utils.misc import check_path
label_desc: Use image node_id 8 for calling the Transform obj's underlying member method code with example usage: obj.apply(example, is_train, stats) without return types