class_docstr: Fetch training curve data from CloudWatch Metrics for a specific training job.
docstr: Fetch all the values of a named metric, and add them to _data
  
  Args:
      metric_name: The metric name to fetch.
docstr_tok: ["Fetch","all","the","values","of","a","named","metric",",","and","add","them","to","_data","Args",":","metric_name",":","The","metric","name","to","fetch","."]
code: def _fetch_metric(self, metric_name):
      """Fetch all the values of a named metric, and add them to _data
  
      Args:
          metric_name: The metric name to fetch.
      """
      request = {
          "Namespace": self.CLOUDWATCH_NAMESPACE,
          "MetricName": metric_name,
          "Dimensions": [
              {"Name": "TrainingJobName", "Value": self.name}
          ],
          "StartTime": self._time_interval["start_time"],
          "EndTime": self._time_interval["end_time"],
          "Period": self._period,
          "Statistics": ["Average"],
      }
      raw_cwm_data = self._cloudwatch.get_metric_statistics(**request)[
          "Datapoints"
      ]
      if len(raw_cwm_data) == 0:
          logger.warning(
              "Warning: No metrics called %s found", metric_name
          )
          return
  
      # Process data: normalize to starting time, and sort.
      base_time = min(raw_cwm_data, key=lambda pt: pt["Timestamp"])[
          "Timestamp"
      ]
      all_xy = []
      for pt in raw_cwm_data:
          y = pt["Average"]
          x = (pt["Timestamp"] - base_time).total_seconds()
          all_xy.append([x, y])
      all_xy = sorted(all_xy, key=lambda x: x[0])
  
      # Store everything in _data to make a dataframe from
      for elapsed_seconds, value in all_xy:
          self._add_single_metric(elapsed_seconds, metric_name, value)
  
imports: from __future__ import print_function, absolute_import
  from abc import ABCMeta, abstractmethod
  from collections import defaultdict, OrderedDict
  import datetime
  import logging
  from six import with_metaclass
  from sagemaker.session import Session
  from sagemaker.utils import DeferredError
  from sagemaker.lineage import artifact
label_desc: Use image node_id 7 for calling the TrainingJobAnalytics obj's underlying member method code with example usage: obj._fetch_metric(metric_name) without return types