class_docstr: R2L model works by reversing target tokens to right to left direction
code: def prepare_inputs(self, src_tokens, hypos):
      bsz, src_length = src_tokens.size()
      beam_size = len(hypos) // bsz
      src_lengths = (
          torch.tensor([src_length])
          .repeat(len(hypos))
          .type_as(src_tokens)
      )
      src_tokens = (
          src_tokens.unsqueeze(1)
          .expand(-1, beam_size, -1)
          .contiguous()
          .view(-1, src_length)
      )
  
      encoder_inputs = (src_tokens, src_lengths)
      tgt_tokens = self.convert_hypos_to_tgt_tokens(hypos).type_as(
          src_tokens
      )
      tgt_tokens = self.reverse_tgt_tokens(tgt_tokens)
  
      return encoder_inputs, tgt_tokens
  
imports: import torch
  from pytorch_translate import utils
label_desc: Use image node_id 2 for calling the R2LModelScorer obj's underlying member method code with example usage: obj.prepare_inputs(src_tokens, hypos) and returns: encoder_inputs,  tgt_tokens