code: def get_durations_histogram(
      recorded_durations: Dict[str, List[float]],
      percentiles: Sequence[float],
  ) -> Dict[str, Dict[str, float]]:
      """Computes a histogram of percentiles from the recorded durations passed in.
  
      Args:
          recorded_durations: The mapping of durations to sync and compute histograms from.
          percentiles: The percentiles to compute. Values should be in the range [0, 100].
  
      Returns:
          A dictionary mapping the action names to a dictionary of the computed percentiles, along with the mean duration of each action.
  
      Raises:
          ValueError: If the input percentiles are not in the range [0, 100].
      """
      _validate_percentiles(percentiles)
      percentiles = sorted(percentiles)
      return _compute_percentiles(
          recorded_durations, percentiles=percentiles
      )
  
imports: import datetime
  import logging
  import os
  from collections import defaultdict
  from contextlib import contextmanager
  from time import perf_counter
  from typing import Any, Dict, Generator, List, Optional, Protocol, runtime_checkable, Sequence, Tuple, TypeVar
  import numpy
  import torch
  import torch.distributed
  from tabulate import tabulate
  from torchtnt.utils.distributed import PGWrapper
label_desc: Use image node_id 5 for calling a global function with example usage: get_durations_histogram(recorded_durations, percentiles) and returns: _compute_percentiles