code: def get_metric_observers(metrics):
      """Returns a list of observers, one for each metric."""
  
      def get_metric_observer(metric):
          def metric_observer(
              time_step, action, next_time_step, policy_state
          ):
              action_step = policy_step.PolicyStep(
                  action, policy_state, ()
              )
              traj = trajectory.from_transition(
                  time_step, action_step, next_time_step
              )
              return metric(traj)
  
          return metric_observer
  
      return [get_metric_observer(m) for m in metrics]
  
file_path: agents/tf_agents/agents/ppo/ppo_utils.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from typing import Sequence
  import tensorflow
  import tensorflow_probability
  from tf_agents.distributions import utils
  from tf_agents.specs import distribution_spec
  from tf_agents.trajectories import policy_step
  from tf_agents.trajectories import time_step
  from tf_agents.trajectories import trajectory
  from tf_agents.typing import types
  from tf_agents.utils import nest_utils
label_desc: Use image node_id 6 for calling a global function with example usage: get_metric_observers(metrics) and returns: unknown, metric_observer, metric