def cleaned_label(self):
        # Repair padding- apparently, TPU/ GPU jit cannot handle the padding here; I'm not sure why. Anyway, it does not seem necessary in our case.
        # labels = self._original_label[:, : self.max_label_length_plus_one]
        """
        labels = tf.cond(
            pred=tf.shape(self._original_label)[1] > self.max_label_length,
            true_fn=lambda: self._original_label[:, :self.max_label_length_plus_one],
            false_fn=lambda: pad_until(
                tensor=self._original_label,
                desired_size=self.max_label_length_plus_one,
                pad_value=self.pad_token_index,
                axis=1
            )
        )
        """
        # mask = tf.sequence_mask(lengths=self._original_label_length, maxlen=tf.shape(labels)[1])
        # blank_label = tf.ones_like(labels) * self.pad_token_index
        # cleaned_label = tf.where(
        #     condition=mask,
        #     x=labels,
        #     y=blank_label,
        # )
        # return cleaned_label
        cleaned_label = pad_until(
            tensor=self._original_label,
            desired_size=self.max_label_length_plus_one,
            pad_value=self.pad_token_index,
            axis=1,
        )
        cleaned_label = cleaned_label[:, : self.max_label_length_plus_one]
        return cleaned_label

        labels = tf.cond(
            pred=tf.shape(self._original_label)[1] > self.max_label_length,
            true_fn=lambda: self._original_label[:, :self.max_label_length_plus_one],
            false_fn=lambda: pad_until(
                tensor=self._original_label,
                desired_size=self.max_label_length_plus_one,
                pad_value=self.pad_token_index,
                axis=1
            )
        )
        
tensorflow_asr/losses/impl/ctc_tpu.py