code: def maybe_assert_negative_binomial_param_correctness(
      is_init,
      validate_args,
      total_count,
      probs,
      logits,
      require_integer_total_count,
  ):
      """Return assertions for `NegativeBinomial`-type distributions."""
      if is_init:
          x, name = (
              (probs, "probs") if logits is None else (logits, "logits")
          )
          if not dtype_util.is_floating(x.dtype):
              raise TypeError(
                  "Argument `{}` must having floating type.".format(
                      name
                  )
              )
  
      if not validate_args:
          return []
  
      assertions = []
      if is_init != tensor_util.is_ref(total_count):
          total_count = tf.convert_to_tensor(total_count)
          assertions.extend(
              [
                  assert_util.assert_positive(
                      total_count,
                      message="`total_count` has components less than or equal to 0.",
                  )
              ]
          )
          if require_integer_total_count:
              assertions.extend(
                  [
                      distribution_util.assert_integer_form(
                          total_count,
                          message="`total_count` has fractional components.",
                      )
                  ]
              )
      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.extend(
                  [
                      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.bijectors import softplus
  from tensorflow_probability.python.distributions import distribution
  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 reparameterization
  from tensorflow_probability.python.internal import samplers
  from tensorflow_probability.python.internal import tensor_util
  from tensorflow_probability.python.math import special
  from tensorflow_probability.python.util.deferred_tensor import DeferredTensor
label_desc: Use image node_id 1 for calling a global function with example usage: maybe_assert_negative_binomial_param_correctness(is_init, validate_args, total_count, probs, logits, require_integer_total_count) and returns: assertions, list