code: def calc_entropy(logits):
      """
      Calculates the entropy of the output values of the network
  
      :param logits: (TensorFlow Tensor) The input probability for each action
      :return: (TensorFlow Tensor) The Entropy of the output values of the network
      """
      # Compute softmax
      a_0 = logits - tf.reduce_max(logits, 1, keepdims=True)
      exp_a_0 = tf.exp(a_0)
      z_0 = tf.reduce_sum(exp_a_0, 1, keepdims=True)
      p_0 = exp_a_0 / z_0
      return tf.reduce_sum(p_0 * (tf.log(z_0) - a_0), 1)
  
imports: import os
  import collections
  import functools
  import multiprocessing
  from typing import Set
  import numpy
  import tensorflow
label_desc: Use image node_id 7 for calling a global function with example usage: calc_entropy(logits) and returns: tf