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 `batch`.
  Args:
      batch (list): a list of examples;
      is_train (bool): Indicate if src/tgt is training data;bject.
docstr_tok: ["Apply","transform","to","`","batch","`",".","Args",":","batch","(","list",")",":","a","list","of","examples",";","is_train","(","bool",")",":","Indicate","if","src\/tgt","is","training","data",";","bject","."]
code: def batch_apply(self, batch, is_train=False, **kwargs):
      """Apply transform to `batch`.
      Args:
          batch (list): a list of examples;
          is_train (bool): Indicate if src/tgt is training data;bject.
      """
      transformed_batch = []
      for example, _, cid in batch:
          example = self.apply(example, is_train=is_train, **kwargs)
          if example is not None:
              transformed_batch.append((example, self, cid))
      return transformed_batch
  
imports: import torch
  from onmt.utils.logging import logger
  from onmt.utils.misc import check_path
label_desc: Use image node_id 9 for calling the Transform obj's underlying member method code with example usage: obj.batch_apply(batch, is_train) and returns: transformed_batch