def test_input_transform(self): block = tdb.Map(tdb.InputTransform(lambda x: 1 + ord(x) - ord('a')) >> tdb.Scalar('int32') >> tdb.Function(tf.negative)) self.assertBuilds([-1, -2, -3, -4], block, 'abcd')