code: def compute_nonparametric_kl_from_normalized_weights(
      normalized_weights: jnp.ndarray,
  ) -> jnp.ndarray:
      """Estimate the actualized KL between the non-parametric and target policies."""
  
      # Compute integrand.
      num_action_samples = normalized_weights.shape[0] / 1.0
      integrand = jnp.log(
          num_action_samples * normalized_weights + 1e-8
      )
  
      # Return the expectation with respect to the non-parametric policy.
      return jnp.sum(normalized_weights * integrand, axis=0)
  
file_path: acme/acme/jax/losses/mpo.py
imports: from typing import NamedTuple, Optional, Tuple, Union
  import jax
  import jax.numpy
  import tensorflow_probability
label_desc: Use image node_id 2 for calling a global function with example usage: compute_nonparametric_kl_from_normalized_weights(normalized_weights) and returns: jnp