code: def maybe_assert_bernoulli_param_correctness(
      is_init, validate_args, probs, probits
  ):
      """Return assertions for `ProbitBernoulli`-type distributions."""
      if is_init:
          x, name = (
              (probs, "probs")
              if probits is None
              else (probits, "probits")
          )
          if not dtype_util.is_floating(x.dtype):
              raise TypeError(
                  "Argument `{}` must having floating type.".format(
                      name
                  )
              )
  
      if not validate_args:
          return []
  
      assertions = []
  
      if probs is not None:
          if is_init != tensor_util.is_ref(probs):
              probs = tf.convert_to_tensor(probs)
              one = tf.constant(1.0, probs.dtype)
              assertions += [
                  assert_util.assert_non_negative(
                      probs, message="probs has components less than 0."
                  ),
                  assert_util.assert_less_equal(
                      probs,
                      one,
                      message="probs has components greater than 1.",
                  ),
              ]
  
      return assertions
  
imports: import tensorflow.compat.v2
  from tensorflow_probability.python.bijectors import sigmoid
  from tensorflow_probability.python.distributions import distribution
  from tensorflow_probability.python.distributions import kullback_leibler
  from tensorflow_probability.python.internal import assert_util
  from tensorflow_probability.python.internal import distribution_util
  from tensorflow_probability.python.internal import dtype_util
  from tensorflow_probability.python.internal import parameter_properties
  from tensorflow_probability.python.internal import prefer_static
  from tensorflow_probability.python.internal import reparameterization
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import special_math
  from tensorflow_probability.python.internal import tensor_util
label_desc: Use image node_id 1 for calling a global function with example usage: maybe_assert_bernoulli_param_correctness(is_init, validate_args, probs, probits) and returns: assertions, list