class_docstr: Class for generating metrics and printing it to stdout of the worker
class_docstr_tok: ["Class","for","generating","metrics","and","printing","it","to","stdout","of","the","worker"]
docstr: return an Ordered Dictionary
docstr_tok: ["return","an","Ordered","Dictionary"]
code: def to_dict(self):
      """
      return an Ordered Dictionary
      """
      return OrderedDict(
          {
              "MetricName": self.name,
              "Value": self.value,
              "Unit": self.unit,
              "Dimensions": self.dimensions,
              "Timestamp": int(time.time()),
              "HostName": socket.gethostname(),
              "RequestId": self.request_id,
          }
      )
  
file_path: serve/ts/metrics/metric.py
imports: import socket
  import time
  from builtins import str
  from collections import OrderedDict
  from ts.metrics.caching_metric import CachingMetric
  from ts.metrics.metric_type_enum import MetricTypes
  from ts.metrics.unit import Units
label_desc: Use image node_id 5 for calling the Metric obj's underlying member method code with example usage: obj.to_dict() and returns: OrderedDict