class_docstr: A Raw Metric Data Object
class_docstr_tok: ["A","Raw","Metric","Data","Object"]
docstr: Converts the metric data to a BatchPutMetrics RawMetricData item
docstr_tok: ["Converts","the","metric","data","to","a","BatchPutMetrics","RawMetricData","item"]
code: def to_raw_metric_data(self):
      """Converts the metric data to a BatchPutMetrics RawMetricData item"""
      # Convert timestamp from float to timestamp str.
      # Otherwise will get ParamValidationError
      raw_metric_data = {
          "MetricName": self.MetricName,
          "Value": self.Value,
          "Timestamp": str(int(self.Timestamp)),
      }
      if self.Step is not None:
          raw_metric_data["Step"] = int(self.Step)
      return raw_metric_data
  
imports: from __future__ import absolute_import
  import datetime
  import logging
  import os
  import time
  import threading
  import queue
  import dateutil.tz
  from sagemaker.session import Session
label_desc: Use image node_id 3 for calling the _RawMetricData obj's underlying member method code with example usage: obj.to_raw_metric_data() and returns: raw_metric_data