class_docstr: LSTM encoder.
code: def reorder_encoder_out(
      self,
      encoder_out: Tuple[Tensor, Tensor, Tensor, Tensor],
      new_order,
  ):
      return tuple(
          (
              encoder_out[0].index_select(1, new_order),
              encoder_out[1].index_select(1, new_order),
              encoder_out[2].index_select(1, new_order),
              encoder_out[3].index_select(1, new_order),
          )
      )
  
imports: from typing import Dict, List, Optional, Tuple
  import torch
  import torch.nn
  import torch.nn.functional
  from fairseq import utils
  from fairseq.models import FairseqEncoder, FairseqEncoderDecoderModel, FairseqIncrementalDecoder, register_model, register_model_architecture
  from fairseq.modules import AdaptiveSoftmax, FairseqDropout
  from torch import Tensor
label_desc: Use image node_id 4 for calling the LSTMEncoder obj's underlying member method code with example usage: obj.reorder_encoder_out(encoder_out, new_order) and returns: tuple