code: def _decode_histogram(value):
      """
      From the tensorflow histogram representation (not plugin), create an aim Distribution
  
      :param value: value with `histo` property
      :return: aim Distribution
      """
      bin_counts = list(value.histo.bucket)
      bucket_limits = list(value.histo.bucket_limit)
  
      if (
          (len(bin_counts) <= 2)
          or (len(bucket_limits) < 2)
          or (bucket_limits[0] == bucket_limits[-1])
      ):
          return None
  
      # This is a bit weird but it seems the histogram counts is usually padded by 0 as tensorboard
      # only stores the right limits?
      # See https://github.com/pytorch/pytorch/blob/7d2a18da0b3427fcbe44b461a0aa508194535885/torch/utils/tensorboard/summary.py#L390 # noqa
      bin_counts = bin_counts[1:]
  
      bin_range = (bucket_limits[0], bucket_limits[-1])
      track_val = Distribution(hist=bin_counts, bin_range=bin_range)
      return track_val
  
imports: from tensorboard.backend.event_processing.directory_watcher import DirectoryWatcher
  from tensorboard.backend.event_processing import event_file_loader
  import tensorflow
  from tensorboard.util import tensor_util
  import time
  import threading
  from pathlib import Path
  import logging
  import os
  import weakref
  import queue
  from typing import Any
  from aim import Audio, Image, Distribution
label_desc: Use image node_id 1 for calling a global function with example usage: _decode_histogram(value) and returns: track_val, None