code: def logit_bernoulli_entropy(logits):
      """
      Reference:
      https://github.com/openai/imitation/blob/99fbccf3e060b6e6c739bdf209758620fcdefd3c/policyopt/thutil.py#L48-L51
  
      :param logits: (tf.Tensor) the logits
      :return: (tf.Tensor) the Bernoulli entropy
      """
      ent = (1.0 - tf.nn.sigmoid(logits)) * logits - logsigmoid(logits)
      return ent
  
file_path: stable-baselines/stable_baselines/gail/adversary.py
imports: import gym
  import tensorflow
  import numpy
  from stable_baselines.common.mpi_running_mean_std import RunningMeanStd
  from stable_baselines.common import tf_util
label_desc: Use image node_id 2 for calling a global function with example usage: logit_bernoulli_entropy(logits) and returns: ent