code: def _assert_multinomial_distribution(input_tensor, axis):
      """Assert input has valid multinomial distribution along `axis`."""
      sum_of_multinomial_distribution = tf.reduce_sum(
          input_tensor=input_tensor, axis=axis
      )
      return [
          tf.debugging.assert_non_negative(input_tensor),
          tf.debugging.assert_near(
              sum_of_multinomial_distribution,
              tf.constant(1.0),
              message="x and/or y is not a proper probability distribution",
          ),
      ]
  
file_path: neural-structured-learning/neural_structured_learning/lib/distances.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import neural_structured_learning.configs
  import tensorflow
label_desc: Use image node_id 1 for calling a global function with example usage: _assert_multinomial_distribution(input_tensor, axis) and returns: list