class_docstr: Task for policy evaluation.
class_docstr_tok: ["Task","for","policy","evaluation","."]
code: def advantage_metrics(self):
      def make_metric(aggregate_fn):  # pylint: disable=invalid-name
          def AdvantageMetric(policy_inputs, actions, advantages, mask):
              del policy_inputs, actions, mask
              return aggregate_fn(advantages)
  
          return tl.Fn("AdvantageMetric", AdvantageMetric)
  
      return {
          "advantage_" + name: make_metric(fn)
          for (name, fn) in [
              ("mean", jnp.mean),
              ("std", jnp.std),
          ]
      }
  
file_path: trax/trax/rl/policy_tasks.py
imports: import numpy
  from trax import layers
  from trax.fastmath import numpy
  from trax.rl import distributions
  from trax.supervised import training
label_desc: Use image node_id 4 for calling the PolicyEvalTask obj's underlying member method code with example usage: obj.advantage_metrics() and returns: unknown, tl, aggregate_fn