code: def testAlgebraInverse(self):
      dataset_objects = algorithmic_math.math_dataset_init(26)
      counter = 0
      for d in algorithmic_math.algebra_inverse(26, 0, 3, 10):
          counter += 1
          decoded_input = dataset_objects.int_decoder(d["inputs"])
          solve_var, expression = decoded_input.split(":")
          lhs, rhs = expression.split("=")
  
          # Solve for the solve-var.
          result = sympy.solve("%s-(%s)" % (lhs, rhs), solve_var)
          target_expression = dataset_objects.int_decoder(d["targets"])
  
          # Check that the target and sympy's solutions are equivalent.
          self.assertEqual(
              0,
              sympy.simplify(
                  str(result[0]) + "-(%s)" % target_expression
              ),
          )
      self.assertEqual(counter, 10)
  
file_path: tensor2tensor/tensor2tensor/data_generators/algorithmic_math_test.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import six
  import sympy
  from tensor2tensor.data_generators import algorithmic_math
  import tensorflow.compat.v1
label_desc: Use image node_id 1 for calling the AlgorithmicMathTest obj's underlying member method code with example usage: obj.testAlgebraInverse() without return types