code: def forward(
      self,
      state: torch.Tensor,
      src_seq: torch.Tensor,
      tgt_out_seq: torch.Tensor,
      src_src_mask: torch.Tensor,
      tgt_out_idx: torch.Tensor,
  ) -> torch.Tensor:
      agg_pred = torch.cat(
          [
              model(
                  state,
                  src_seq,
                  tgt_out_seq,
                  src_src_mask,
                  tgt_out_idx,
              )
              for model in self.models
          ],
          dim=1,
      )
      return torch.median(agg_pred, dim=1, keepdim=True).values
  
imports: import copy
  import logging
  from typing import List
  import torch
  import torch.nn
  import torch.nn.functional
  from reagent.core import types
  from reagent.core.torch_utils import gather
  from reagent.model_utils.seq2slate_utils import subsequent_mask
  from reagent.models.base import ModelBase
  from reagent.models.seq2slate import Decoder, DecoderLayer, Embedder, Encoder, EncoderLayer, MultiHeadedAttention, PositionalEncoding, PositionwiseFeedForward
label_desc: Use image node_id 2 for calling the Seq2SlateRewardNetEnsemble obj's underlying member method code with example usage: obj.forward(state, src_seq, tgt_out_seq, src_src_mask, tgt_out_idx) and returns: torch