class_docstr: Random mask tokens from src sentence.
code: def _token_mask(self, tokens, stats=None):
      # 1. sample number of tokens to corrupt
      n_chosen = self._sample_distance(tokens, self.temperature)
      # 2. sample positions to corrput
      chosen_indices = self._sample_position(tokens, distance=n_chosen)
      # 3. mask word on chosen position
      for i in chosen_indices:
          tokens[i] = self.MASK_TOK
      if stats is not None:
          stats.update(TokenDropStats(n_chosen, len(tokens)))
      return tokens
  
imports: import random
  import numpy
  from onmt.constants import DefaultTokens
  from onmt.transforms import register_transform
  from .transform import Transform, ObservableStats
label_desc: Use image node_id 5 for calling the TokenMaskTransform obj's underlying member method code with example usage: obj._token_mask(tokens, stats) and returns: tokens