docstr: Add tags (placeholders) to source and target segments.
docstr_tok: ["Add","tags","(","placeholders",")","to","source","and","target","segments","."]
code: def apply(
      self, example, is_train=False, stats=None, **kwargs
  ) -> tuple:
      """Add tags (placeholders) to source and target segments."""
  
      src_tgt_pair, is_match = self.tagger._tagged_src_tgt(
          " ".join(example["src"]), " ".join(example["tgt"])
      )
      example["src"] = src_tgt_pair[0]
      example["tgt"] = src_tgt_pair[1]
  
      return example, is_match
  
imports: from onmt.utils.logging import logger
  from onmt.transforms import register_transform
  from .transform import Transform
  import random
  import ahocorasick
  import string
label_desc: Use image node_id 7 for calling the InlineTagsTransform obj's underlying member method code with example usage: obj.apply(example, is_train, stats) and returns: example,  is_match