keras/src/layers/rnn/conv_lstm.py/ConvLSTM/compute_mask
class ConvLSTM:    def compute_mask(self, _, mask):
        mask = tree.flatten(mask)[0]
        output_mask = mask if self.return_sequences else None
        if self.return_state:
            state_mask = [None, None]
            return [output_mask] + state_mask
        else:
            return output_mask