class_docstr: Scale histogram of a timeseries dataset.
  
  This counts the number of timeseries whose mean of absolute values is in
  the `[base ** i, base ** (i+1)]` range for all possible `i`.
  The number of entries with empty target is counted separately.
  
  Parameters
  ----------
  base
      Log-width of the histogram's buckets.
  bin_counts
  empty_target_count
class_docstr_tok: ["Scale","histogram","of","a","timeseries","dataset",".","This","counts","the","number","of","timeseries","whose","mean","of","absolute","values","is","in","the","`","[","base","*","*","i",",","base","*","*","(","i+1",")","]","`","range","for","all","possible","`","i","`",".","The","number","of","entries","with","empty","target","is","counted","separately",".","Parameters","--","--","--","--","--","base","Log-width","of","the","histogram","'s","buckets",".","bin_counts","empty_target_count"]
code: def count(self, target):
      if len(target) > 0:
          return self.bin_counts[self.bucket_index(target)]
      else:
          return self.empty_target_count
  
imports: import math
  from collections import defaultdict
  from typing import Any, List, NamedTuple, Optional, Set
  import numpy
  from gluonts.core.component import validated
  from gluonts.dataset.field_names import FieldName
  from gluonts.exceptions import assert_data_error
  from gluonts.gluonts_tqdm import tqdm
label_desc: Use image node_id 4 for calling the ScaleHistogram obj's underlying member method code with example usage: obj.count(target) and returns: self, self