class_docstr: A map-to-arrays dict, with deterministic Reservoir Sampling.
  
  Store each reservoir bucket by key, and each bucket is a list sampling
  with reservoir algorithm.
docstr: Add a new scalar item to reservoir buckets with given tag as key.
  
  If bucket with key has not yet reached full size, each item will be
  added.
  
  If bucket with key is full, each item will be added with same
  probability.
  
  Add new item to buckets will always valid because self._buckets is a
  collection.defaultdict.
  
  Args:
      key: Tag of one bucket to add new item.
      item: New item to add to bucket.
docstr_tok: ["Add","a","new","scalar","item","to","reservoir","buckets","with","given","tag","as","key",".","If","bucket","with","key","has","not","yet","reached","full","size",",","each","item","will","be","added",".","If","bucket","with","key","is","full",",","each","item","will","be","added","with","same","probability",".","Add","new","item","to","buckets","will","always","valid","because","self._buckets","is","a","collection.defaultdict",".","Args",":","key",":","Tag","of","one","bucket","to","add","new","item",".","item",":","New","item","to","add","to","bucket","."]
code: def _add_scalars_item(self, key, item):
      """Add a new scalar item to reservoir buckets with given tag as key.
  
      If bucket with key has not yet reached full size, each item will be
      added.
  
      If bucket with key is full, each item will be added with same
      probability.
  
      Add new item to buckets will always valid because self._buckets is a
      collection.defaultdict.
  
      Args:
          key: Tag of one bucket to add new item.
          item: New item to add to bucket.
      """
      with self._mutex:
          self._buckets[key].add_scalars_item(item)
  
imports: import collections
  import random
  import threading
label_desc: Use image node_id 11 for calling the Reservoir obj's underlying member method code with example usage: obj._add_scalars_item(key, item) without return types