def METHOD_NAME(structure):
  with tf.Graph().as_default():
    result, error = tensor_utils.zero_all_if_any_non_finite(structure)
    with self.session() as sess:
      result, error = sess.run((result, error))
    try:
      tf.nest.map_structure(np.testing.assert_allclose, result, structure)
    except AssertionError:
      self.fail(
          'Expected to get input {} back, but instead got {}'.format(
              structure, result
          )
      )
    self.assertEqual(error, 0)