class_docstr: Handles a ListSessionGroups request.
class_docstr_tok: ["Handles","a","ListSessionGroups","request","."]
docstr: Builds the session metric values.
code: def _build_session_metric_values(
      self, metric_infos, session_name, all_metric_evals
  ):
      """Builds the session metric values."""
  
      # result is a list of api_pb2.MetricValue instances.
      result = []
      for metric_info in metric_infos:
          metric_name = metric_info.name
          (run, tag) = metrics.run_tag_from_session_and_metric(
              session_name, metric_name
          )
          datum = all_metric_evals.get(run, {}).get(tag)
          if not datum:
              # 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
          result.append(
              api_pb2.MetricValue(
                  name=metric_name,
                  wall_time_secs=datum.wall_time,
                  training_step=datum.step,
                  value=datum.value,
              )
          )
      return result
  
imports: import collections
  import dataclasses
  import operator
  import re
  from typing import Optional
  from google.protobuf import struct_pb2
  from tensorboard.data import provider
  from tensorboard.plugins.hparams import api_pb2
  from tensorboard.plugins.hparams import backend_context
  from tensorboard.plugins.hparams import error
  from tensorboard.plugins.hparams import json_format_compat
  from tensorboard.plugins.hparams import metadata
  from tensorboard.plugins.hparams import metrics
  from tensorboard.plugins.hparams import plugin_data_pb2
label_desc: Use image node_id 8 for calling the Handler obj's underlying member method code with example usage: obj._build_session_metric_values(metric_infos, session_name, all_metric_evals) and returns: result