def create_position_ids_from_input_ids(self, input_ids: tf.Tensor) -> tf.Tensor:
        """
        Replace non-padding symbols with their position numbers. Position numbers begin at padding_token_index + 1.
        """
        mask = tf.cast(tf.not_equal(input_ids, self.padding_token_index), input_ids.dtype)
        position_ids = tf.cumsum(mask, axis=1) * mask
        position_ids = position_ids + self.padding_token_index
        return position_ids

        Replace non-padding symbols with their position numbers. Position numbers begin at padding_token_index + 1.
        
dpkd/transformers/src/transformers/models/layoutlmv3/modeling_tf_layoutlmv3.py