code: def test_get_synced_durations_histogram(self) -> None:
      recorded_durations = {
          "bar": [4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0],
          "foo": [1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0],
          "baz": [
              7.0,
              8.0,
              9.0,
              10.0,
              11.0,
              12.0,
              13.0,
              14.0,
              15.0,
              16.0,
          ],
      }
      percentiles = (10.0, 25.0, 50.0, 75.0, 95.0, 99.0)
      durations = get_durations_histogram(
          recorded_durations, percentiles
      )
      synced_durations = get_synced_durations_histogram(
          recorded_durations, percentiles
      )
      expected_durations = {
          "bar": {
              "p10.0": 4.0,
              "p25.0": 6.0,
              "p50.0": 8.0,
              "p75.0": 10.0,
              "p95.0": 11.0,
              "p99.0": 11.0,
              "avg": 8.0,
          },
          "foo": {
              "p10.0": 1.0,
              "p25.0": 3.0,
              "p50.0": 5.0,
              "p75.0": 7.0,
              "p95.0": 9.0,
              "p99.0": 9.0,
              "avg": 5.5,
          },
          "baz": {
              "p10.0": 7.0,
              "p25.0": 9.0,
              "p50.0": 11.0,
              "p75.0": 13.0,
              "p95.0": 15.0,
              "p99.0": 15.0,
              "avg": 11.5,
          },
      }
      self.assertEqual(durations, expected_durations)
      self.assertEqual(durations, synced_durations)
  
imports: import os
  import time
  import unittest
  from datetime import timedelta
  from random import random
  from unittest import mock
  from unittest.mock import Mock, patch
  import torch
  import torch.distributed
  from pyre_extensions import none_throws
  from torchtnt.utils.test_utils import skip_if_not_distributed, skip_if_not_gpu, spawn_multi_process
  from torchtnt.utils.timer import BoundedTimer, FullSyncPeriodicTimer, get_durations_histogram, get_recorded_durations_table, get_synced_durations_histogram, get_timer_summary, log_elapsed_time, logger, Timer
label_desc: Use image node_id 8 for calling the TimerTest obj's underlying member method code with example usage: obj.test_get_synced_durations_histogram() without return types