code: def test_dataset_histogram(self) -> None:
      # generates 2 ** N - 1 timeseries with constant increasing values
      N = 6
      n = 2**N - 1
      T = 5
      targets = np.ones((n, T))
      for i in range(0, n):
          targets[i, :] = targets[i, :] * i
  
      # FIXME: the cast below is a hack to make mypy happy
      timeseries = cast(
          Dataset,
          [make_time_series(target=targets[i, :]) for i in range(n)],
      )
  
      found = calculate_dataset_statistics(timeseries)
  
      hist = found.scale_histogram.bin_counts
      for i in range(0, N):
          assert i in hist
          assert hist[i] == 2**i
  
file_path: gluonts/test/dataset/test_stat.py
imports: import unittest
  from typing import cast
  import numpy
  import pandas
  from gluonts.dataset.common import DataEntry, Dataset
  from gluonts.dataset.stat import DatasetStatistics, ScaleHistogram, calculate_dataset_statistics
  from gluonts.exceptions import GluonTSDataError
label_desc: Use image node_id 2 for calling the DatasetStatisticsTest obj's underlying member method code with example usage: obj.test_dataset_histogram() without return types