code: def _det_ok_mask(x, det_bounds, input_output_cholesky=False):
      if input_output_cholesky:
          logdet = 2.0 * tf.reduce_sum(
              tf.math.log(tf.linalg.diag_part(x)), axis=[-1]
          )
      else:
          _, logdet = tf.linalg.slogdet(x)
  
      return tf.cast(tf.exp(logdet) > det_bounds, dtype=x.dtype)
  
imports: from absl.testing import parameterized
  import numpy
  import tensorflow.compat.v1
  import tensorflow.compat.v2
  from tensorflow_probability.python.distributions import lkj
  from tensorflow_probability.python.distributions.internal import statistical_testing
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import test_util
label_desc: Use image node_id 1 for calling a global function with example usage: _det_ok_mask(x, det_bounds, input_output_cholesky) and returns: tf