code: def epsilon_greedy(epsilon=None):
      """An epsilon-greedy distribution."""
  
      warnings.warn(
          "Rlax epsilon_greedy will be deprecated. "
          "Please use distrax.EpsilonGreedy instead.",
          PendingDeprecationWarning,
          stacklevel=2,
      )
  
      def sample_fn(key: Array, preferences: Array, epsilon=epsilon):
          return distrax.EpsilonGreedy(preferences, epsilon).sample(
              seed=key
          )
  
      def probs_fn(preferences: Array, epsilon=epsilon):
          return distrax.EpsilonGreedy(preferences, epsilon).probs
  
      def logprob_fn(
          sample: Array, preferences: Array, epsilon=epsilon
      ):
          return distrax.EpsilonGreedy(preferences, epsilon).log_prob(
              sample
          )
  
      def entropy_fn(preferences: Array, epsilon=epsilon):
          return distrax.EpsilonGreedy(preferences, epsilon).entropy()
  
      return DiscreteDistribution(
          sample_fn, probs_fn, logprob_fn, entropy_fn, None
      )
  
file_path: rlax/rlax/_src/distributions.py
imports: import collections
  import warnings
  import chex
  import distrax
  import jax.numpy
label_desc: Use image node_id 5 for calling a global function with example usage: epsilon_greedy(epsilon) and returns: DiscreteDistribution, distrax, distrax, distrax, distrax