code: def _compare_tensorflow_matrix(variables, expr, use_float=False):
      f = lambdify(variables, expr, "tensorflow")
      if not use_float:
          random_matrices = [
              randMatrix(v.rows, v.cols) for v in variables
          ]
      else:
          random_matrices = [
              randMatrix(v.rows, v.cols) / 100.0 for v in variables
          ]
  
      graph = tf.Graph()
      r = None
      with graph.as_default():
          random_variables = [
              eval(tensorflow_code(i)) for i in random_matrices
          ]
          session = tf.compat.v1.Session(graph=graph)
          r = session.run(f(*random_variables))
  
      e = expr.subs(dict(zip(variables, random_matrices)))
      e = e.doit()
      if e.is_Matrix:
          if not isinstance(e, MatrixBase):
              e = e.as_explicit()
          e = e.tolist()
  
      if not use_float:
          assert (r == e).all()
      else:
          r = [i for row in r for i in row]
          e = [i for row in e for i in row]
          assert all(
              abs(a - b) < 10 ** -(4 - int(log(abs(a), 10)))
              for a, b in zip(r, e)
          )
  
imports: import random
  from sympy.core.function import Derivative
  from sympy.core.symbol import symbols
  from sympy.tensor.array.expressions.array_expressions import ArrayTensorProduct, ArrayAdd, PermuteDims, ArrayDiagonal
  from sympy.core.relational import Eq, Ne, Ge, Gt, Le, Lt
  from sympy.external import import_module
  from sympy.functions import Abs, ceiling, exp, floor, sign, sin, asin, sqrt, cos, acos, tan, atan, atan2, cosh, acosh, sinh, asinh, tanh, atanh, re, im, arg, erf, loggamma, log
  from sympy.matrices import Matrix, MatrixBase, eye, randMatrix
  from sympy.matrices.expressions import Determinant, HadamardProduct, Inverse, MatrixSymbol, Trace
  from sympy.printing.tensorflow import tensorflow_code
  from sympy.tensor.array.expressions.from_matrix_to_array import convert_matrix_to_array
  from sympy.utilities.lambdify import lambdify
  from sympy.testing.pytest import skip
  from sympy.testing.pytest import XFAIL
label_desc: Use image node_id 1 for calling a global function with example usage: _compare_tensorflow_matrix(variables, expr, use_float) without return types