class_docstr: Class that manages the training loop. See speechbrain.core.Brain.
class_docstr_tok: ["Class","that","manages","the","training","loop",".","See","speechbrain.core.Brain","."]
docstr: Double the tokens batch if features are doubled.
  
  Arguments
  ---------
  stage : sb.Stage
      Currently executing stage.
  tokens : tuple
      The tokens (tensor) and their lengths (tensor).
docstr_tok: ["Double","the","tokens","batch","if","features","are","doubled",".","Arguments","--","--","--","--","-","stage",":","sb.Stage","Currently","executing","stage",".","tokens",":","tuple","The","tokens","(","tensor",")","and","their","lengths","(","tensor",")","."]
code: def prepare_tokens(self, stage, tokens):
      """Double the tokens batch if features are doubled.
  
      Arguments
      ---------
      stage : sb.Stage
          Currently executing stage.
      tokens : tuple
          The tokens (tensor) and their lengths (tensor).
      """
      tokens, token_lens = tokens
      if (
          hasattr(self.modules, "env_corrupt")
          and stage == sb.Stage.TRAIN
      ):
          tokens = torch.cat([tokens, tokens], dim=0)
          token_lens = torch.cat([token_lens, token_lens], dim=0)
      return tokens, token_lens
  
file_path: orion/examples/speechbrain_tutorial/train.py
imports: import logging
  import sys
  import speechbrain
  import torch
  from hyperpyyaml import load_hyperpyyaml
  from mini_librispeech_prepare import prepare_mini_librispeech
  from speechbrain.utils.distributed import run_on_main
label_desc: Use image node_id 4 for calling the ASR obj's underlying member method code with example usage: obj.prepare_tokens(stage, tokens) and returns: tokens,  token_lens