code: def _get_encoder_hidden_states(
      self, src_ids, encoder_input_mask, ensemble_index
  ):
      return self.encoders[ensemble_index](
          input_ids=src_ids, encoder_mask=encoder_input_mask
      )
  
imports: from contextlib import contextmanager
  import torch
  from nemo.collections.common.parts import NEG_INF, mask_padded_tokens
label_desc: Use image node_id 6 for calling the EnsembleBeamSearchSequenceGenerator obj's underlying member method code with example usage: obj._get_encoder_hidden_states(src_ids, encoder_input_mask, ensemble_index) and returns: self