def METHOD_NAME(self, audio_signal, length=None):
    max_audio_length: int = audio_signal.size(-1)
    if length is None:
        length = audio_signal.new_full(
            audio_signal.size(0), max_audio_length, dtype=torch.int32, device=self.seq_range.device
        )
    audio_signal = torch.transpose(audio_signal, 1, 2)
    if isinstance(self.pre_encode, nn.Linear):
        audio_signal = self.pre_encode(audio_signal)
    else:
        audio_signal, length = self.pre_encode(audio_signal, length)
    for lth, layer in enumerate(self.layers):
        audio_signal = layer(audio_signal)
        if isinstance(audio_signal, tuple):
            audio_signal, _ = audio_signal
    audio_signal = torch.transpose(audio_signal, 1, 2)
    return audio_signal, length