  def test_recursive_tf_function_with_cond(self):
    @def_function.function(autograph=False)
    def recursive_fn(n):
      return cond_v2.cond_v2(n > 0, recursive_fn(n - 1), 1)

    with self.assertRaises(RecursionError):
      recursive_fn(constant_op.constant(5))
The software does not properly acquire or release a lock on a resource, leading to unexpected resource state changes and behaviors.