code: def _build_session_metric_values(self, session_name):
      
  
      # result is a list of api_pb2.MetricValue instances.
      result = []
      metric_infos = self._experiment.metric_infos
      for metric_info in metric_infos:
        metric_name = metric_info.name
        try:
          metric_eval = metrics.last_metric_eval(
              self._context.multiplexer,
              session_name,
              metric_name)
        except KeyError:
          # It's ok if we don't find the metric in the session.
          # We skip it here. For filtering and sorting purposes its value is None.
          continue
  
        # metric_eval is a 3-tuple of the form [wall_time, step, value]
        result.append(api_pb2.MetricValue(name=metric_name,
                                          wall_time_secs=metric_eval[0],
                                          training_step=metric_eval[1],
                                          value=metric_eval[2]))
      return result
docs: Builds the session metric values.