class_docstr: Collects metrics and sends them directly to metrics service.
class_docstr_tok: ["Collects","metrics","and","sends","them","directly","to","metrics","service","."]
docstr: Initialize a `_AsyncMetricsSink` instance
  
  Args:
      trial_component_name (str): The Name of the Trial Component to log metrics to.
      metrics_client (boto3.client): boto client for metrics service
docstr_tok: ["Initialize","a","`","_AsyncMetricsSink","`","instance","Args",":","trial_component_name","(","str",")",":","The","Name","of","the","Trial","Component","to","log","metrics","to",".","metrics_client","(","boto3.client",")",":","boto","client","for","metrics","service"]
code: def __init__(self, trial_component_name, metrics_client) -> None:
      """Initialize a `_AsyncMetricsSink` instance
  
      Args:
          trial_component_name (str): The Name of the Trial Component to log metrics to.
          metrics_client (boto3.client): boto client for metrics service
      """
      self._trial_component_name = trial_component_name
      self._metrics_client = metrics_client
      self._buffer = []
      self._is_draining = False
      self._metric_queues = {}
  
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 1 to create a new _AsyncMetricsSink object from inherited base classes: object with example: obj = _AsyncMetricsSink(trial_component_name, metrics_client)