docs: def _setup_metric_group_values(self):
          """
          Return the list of MetricGroupValues objects for this metrics response,
          by processing its metrics response string.
  
          The lines in the metrics response string are::
  
              MetricsResponse: MetricsGroup{0,*}
                               <emptyline>      a third empty line at the end
  
              MetricsGroup:    MetricsGroupName
                               ObjectValues{0,*}
                               <emptyline>      a second empty line after each MG
  
              ObjectValues:    ObjectURI
                               Timestamp
                               ValueRow{1,*}
                               <emptyline>      a first empty line after this blk
          """
  
          mg_defs = self._metrics_context.metric_group_definitions
  
          metric_group_name = None
          resource_uri = None
          dt_timestamp = None
  
          object_values = None
          metric_group_values = list()
          state = 0
          for mr_line in self._metrics_response_str.splitlines():
              if state == 0:
                  if object_values is not None:
                      # Store the result from the previous metric group
                      mgv = MetricGroupValues(metric_group_name, object_values)
                      metric_group_values.append(mgv)
                      object_values = None
                  if mr_line == '':
                      # Skip initial (or trailing) empty lines
                      pass
                  else:
                      # Process the next metrics group
                      metric_group_name = mr_line.strip('"')  # No " or \ inside
                      assert metric_group_name in mg_defs
                      m_defs = mg_defs[metric_group_name].metric_definitions
                      object_values = list()
                      state = 1
              elif state == 1:
                  if mr_line == '':
                      # There are no (or no more) ObjectValues items in this
                      # metrics group
                      state = 0
                  else:
                      # There are ObjectValues items
                      resource_uri = mr_line.strip('"')  # No " or \ inside
                      state = 2
              elif state == 2:
                  # Process the timestamp
                  assert mr_line != ''
                  try:
                      dt_timestamp = datetime_from_timestamp(int(mr_line))
                  except ValueError:
                      # Sometimes, the returned epoch timestamp values are way
                      # too large, e.g. 3651584404810066 (which would translate
                      # to the year 115791 A.D.). Python datetime supports
                      # up to the year 9999. We circumvent this issue by
                      # simply using the current date&time.
                      # TODO: Remove the circumvention for too large timestamps.
                      dt_timestamp = datetime.now(pytz.utc)
                  state = 3
              elif state == 3:
                  if mr_line != '':
                      # Process the metric values in the ValueRow line
                      str_values = mr_line.split(',')
                      metrics = dict()
                      for m_name in m_defs:
                          m_def = m_defs[m_name]
                          m_type = m_def.type
                          m_value_str = str_values[m_def.index]
                          m_value = _metric_value(m_value_str, m_type)
                          metrics[m_name] = m_value
                      ov = MetricObjectValues(
                          self._client, mg_defs[metric_group_name], resource_uri,
                          dt_timestamp, metrics)
                      object_values.append(ov)
                      # stay in this state, for more ValueRow lines
                  else:
                      # On the empty line after the last ValueRow line
                      state = 1
  
          return metric_group_values