code: def numpy_kl_with_logits(p_logits, q_logits):
      def numpy_softmax(logits):
          logits -= np.max(logits, axis=1, keepdims=True)
          exp_logits = np.exp(logits)
          return exp_logits / np.sum(exp_logits, axis=1, keepdims=True)
  
      p = numpy_softmax(p_logits)
      log_p = p_logits - np.log(
          np.sum(np.exp(p_logits), axis=1, keepdims=True)
      )
      log_q = q_logits - np.log(
          np.sum(np.exp(q_logits), axis=1, keepdims=True)
      )
      return (p * (log_p - log_q)).sum(axis=1).mean()
  
file_path: cleverhans/cleverhans_v3.1.0/tests_tf/test_utils_tf.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import numpy
  import tensorflow
  from cleverhans import utils_tf
  from cleverhans.devtools.checks import CleverHansTest
label_desc: Use image node_id 1 for calling a global function with example usage: numpy_kl_with_logits(p_logits, q_logits) and returns: unknown, unknown