def testLogAPIUseWithNestedFunction(self):
    """Tests that API call is not logged when called from another logged API."""

    @common.log_api_use("test_collection")
    def fn0():
      fn1()
      return fn2()

    @common.log_api_use("test_collection")
    def fn1():
      return None

    @common.log_api_use("another_collection")
    def fn2():
      return None

    with tf.compat.v1.Graph().as_default() as graph:
      fn0()

    self.assertEqual([{"fn0": 1}], graph.get_collection("test_collection"))
    self.assertAllEqual([], graph.get_collection("another_collection"))
Tests that API call is not logged when called from another logged API.
tensorflow_transform/common_test.py