code: def _validate_arg_if_not_none(arg, assertion, validate_args):
      if arg is None:
          return arg
      with tf.control_dependencies(
          [assertion(arg)] if validate_args else []
      ):
          result = tf.identity(arg)
      return result
  
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import nest_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.math.psd_kernels import positive_semidefinite_kernel
  from tensorflow_probability.python.math.psd_kernels.internal import util
label_desc: Use image node_id 1 for calling a global function with example usage: _validate_arg_if_not_none(arg, assertion, validate_args) and returns: result, arg