class_docstr: Add Prefix to src (& tgt) sentence.
docstr: Apply prefix prepend to example.
  
  Should provide `corpus_name` to get correspond prefix.
docstr_tok: ["Apply","prefix","prepend","to","example",".","Should","provide","`","corpus_name","`","to","get","correspond","prefix","."]
code: def apply(self, example, is_train=False, stats=None, **kwargs):
      """Apply prefix prepend to example.
  
      Should provide `corpus_name` to get correspond prefix.
      """
      corpus_name = kwargs.get("corpus_name", None)
      if corpus_name is None:
          raise ValueError("corpus_name is required.")
      corpus_prefix = self.prefix_dict.get(corpus_name, None)
      if corpus_prefix is None:
          raise ValueError(f"prefix for {corpus_name} does not exist.")
      return self._prepend(example, corpus_prefix)
  
imports: from onmt.utils.logging import logger
  from onmt.transforms import register_transform
  from .transform import Transform, ObservableStats
label_desc: Use image node_id 8 for calling the PrefixTransform obj's underlying member method code with example usage: obj.apply(example, is_train, stats) and returns: self