src/transformers/models/oneformer/modeling_oneformer.py/OneFormerTransformerDecoderSelfAttentionLayer/forward
class OneFormerTransformerDecoderSelfAttentionLayer:    def forward(
        self,
        output,
        output_mask: Optional[Tensor] = None,
        output_key_padding_mask: Optional[Tensor] = None,
        query_pos: Optional[Tensor] = None,
    ):
        if self.normalize_before:
            return self.forward_pre(output, output_mask, output_key_padding_mask, query_pos)
        return self.forward_post(output, output_mask, output_key_padding_mask, query_pos)