import tensorflow as tf

                         [0, 0, 0, 0, 1, 1, 1, 1],
                         [0, 0, 0, 0, 1, 1, 1, 1]],
                        dtype=tf.float32)
    masks = tf.stack([mask0, mask1, mask2])
    return masks

  def test_map_labels_to_0_to_n1(self):
    labels = tf.constant([[-1, 2, 5],
                          [0, 9, 1]], dtype=tf.int32)
    labels_0_n = isu.map_labels_to_0_to_n(labels)
    expected_labels_0_n = tf.constant([[-1, 2, 3],
                                       [0, 4, 1]], dtype=tf.int32)
    self.assertAllEqual(labels_0_n.numpy(), expected_labels_0_n.numpy())

  def test_map_labels_to_0_to_n2(self):
    labels = tf.constant([[-1, 1, 2],
                          [1, 1, 2]], dtype=tf.int32)
    labels_0_n = isu.map_labels_to_0_to_n(labels)
    expected_labels_0_n = tf.constant([[-1, 0, 1],
                                       [0, 0, 1]], dtype=tf.int32)
