A generator for the values of the metric across the sessions in the group.

  Args:
    session_group: A SessionGroup protobuffer.
    metric_name: A MetricName protobuffer.
  Yields:
    The next metric value wrapped in a _Measurement instance.

def _measurements(session_group, metric_name):
  """A generator for the values of the metric across the sessions in the group.

  Args:
    session_group: A SessionGroup protobuffer.
    metric_name: A MetricName protobuffer.
  Yields:
    The next metric value wrapped in a _Measurement instance.
  """
  for session_index, session in enumerate(session_group.sessions):
    metric_value = _find_metric_value(session, metric_name)
    if not metric_value:
      continue
    yield _Measurement(metric_value, session_index)