code: def no_pd_errors():
      """Catch and ignore examples where a Cholesky decomposition fails.
  
      This will typically occur when the matrix is not positive definite.
  
      Yields:
        None
      """
      # TODO(b/174591555): Instead of catching and `assume`ing away positive
      # definite errors, avoid them in the first place.
      try:
          yield
      except tf.errors.OpError as e:
          # NOTE: When tf.linalg.cholesky fails, it returns a matrix with nans on and
          # below the diagonal.  When we use the Cholesky decomposition in a solve,
          # TF will raise an error that the matrix of nans is not invertible.
          if re.search(r"Input matrix is not invertible", str(e)):
              hp.assume(False)
          else:
              raise
  
imports: import collections
  import contextlib
  import inspect
  import logging
  import re
  import hypothesis
  from hypothesis.extra import numpy
  import hypothesis.strategies
  import numpy
  import tensorflow.compat.v2
  from tensorflow_probability.python.experimental.distributions import marginal_fns
  from tensorflow_probability.python.internal import hypothesis_testlib
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.internal import tensorshape_util
  from tensorflow_probability.python.math import psd_kernels
label_desc: Use image node_id 3 for calling a global function with example usage: no_pd_errors() without return types