class_docstr: Collects metrics and sends them directly to metrics service.
class_docstr_tok: ["Collects","metrics","and","sends","them","directly","to","metrics","service","."]
docstr: Creates dictionary object used as request to metrics service.
docstr_tok: ["Creates","dictionary","object","used","as","request","to","metrics","service","."]
code: def _construct_batch_put_metrics_request(self, batch):
      """Creates dictionary object used as request to metrics service."""
      return {
          "TrialComponentName": self._trial_component_name.lower(),
          "MetricData": list(
              map(lambda x: x.to_raw_metric_data(), batch)
          ),
      }
  
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 5 for calling the _SyncMetricsSink obj's underlying member method code with example usage: obj._construct_batch_put_metrics_request(batch) and returns: dict