code: def test_encoder_invalid_layer_type():
      with pytest.raises(ValueError):
          ConformerEncoder(20, rel_pos_type="dummy")
      with pytest.raises(ValueError):
          ConformerEncoder(20, pos_enc_layer_type="dummy")
      with pytest.raises(ValueError):
          ConformerEncoder(
              20,
              pos_enc_layer_type="abc_pos",
              selfattention_layer_type="dummy",
          )
  
file_path: espnet/test/espnet2/asr/encoder/test_conformer_encoder.py
imports: import pytest
  import torch
  from espnet2.asr.ctc import CTC
  from espnet2.asr.encoder.conformer_encoder import ConformerEncoder
label_desc: Use image node_id 2 for calling a global function with example usage: test_encoder_invalid_layer_type() without return types