class_docstr: Base class for encoders.
docstr: Reorder encoder output according to `new_order`.
  
  Args:
      encoder_out: output from the ``forward()`` method
      new_order (LongTensor): desired order
  
  Returns:
      `encoder_out` rearranged according to `new_order`
docstr_tok: ["Reorder","encoder","output","according","to","`","new_order","`",".","Args",":","encoder_out",":","output","from","the","``","forward","(",")","``","method","new_order","(","LongTensor",")",":","desired","order","Returns",":","`","encoder_out","`","rearranged","according","to","`","new_order","`"]
code: def reorder_encoder_out(self, encoder_out, new_order):
      """
      Reorder encoder output according to `new_order`.
  
      Args:
          encoder_out: output from the ``forward()`` method
          new_order (LongTensor): desired order
  
      Returns:
          `encoder_out` rearranged according to `new_order`
      """
      raise NotImplementedError
  
file_path: fairseq/fairseq/models/fairseq_encoder.py
imports: from typing import Dict, List, NamedTuple, Optional
  import torch
  import torch.nn
  from torch import Tensor
label_desc: Use image node_id 5 for calling the FairseqEncoder obj's underlying member method code with example usage: obj.reorder_encoder_out(encoder_out, new_order) without return types