code: def LogLoss(
      distribution, **unused_kwargs
  ):  # pylint: disable=invalid-name
      """Builds a log loss layer for a Distribution."""
      return tl.Serial(
          distribution.LogProb(), tl.Negate(), tl.WeightedSum()
      )
  
imports: import gin
  import gym
  import numpy
  from trax import layers
  from trax.fastmath import numpy
label_desc: Use image node_id 2 for calling a global function with example usage: LogLoss(distribution) and returns: tl