class_docstr: This sample can be used when working with a set of time series that have a
  skewed distributions. For instance, if the dataset contains many time
  series with small values and few with large values.
  
  The probability of sampling from bucket i is the inverse of its number of
  elements.
  
  Parameters
  ----------
  scale_histogram
      The histogram of scale for the time series. Here scale is the mean abs
      value of the time series.
class_docstr_tok: ["This","sample","can","be","used","when","working","with","a","set","of","time","series","that","have","a","skewed","distributions",".","For","instance",",","if","the","dataset","contains","many","time","series","with","small","values","and","few","with","large","values",".","The","probability","of","sampling","from","bucket","i","is","the","inverse","of","its","number","of","elements",".","Parameters","--","--","--","--","--","scale_histogram","The","histogram","of","scale","for","the","time","series",".","Here","scale","is","the","mean","abs","value","of","the","time","series","."]
code: def __call__(self, ts: np.ndarray) -> np.ndarray:
      a, b = self._get_bounds(ts)
      p = 1.0 / self.scale_histogram.count(ts)
      (indices,) = np.where(np.random.random_sample(b - a + 1) < p)
      return indices + a
  
imports: from typing import Tuple
  import numpy
  from gluonts.dataset.stat import ScaleHistogram
  from gluonts.pydantic import BaseModel
label_desc: Use image node_id 1 for calling the BucketInstanceSampler obj's underlying member method code with example usage: obj.__call__(ts) and returns: unknown