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.
  
  For usage habits of VisualDL, actually call self._add_items()
  
  Args:
      run: Identity of one tablet.
      tag: Identity of one record in tablet.
      item: New item to add to bucket.
docstr_tok: ["Add","a","new","scalar","item","to","reservoir","buckets","with","given","tag","as","key",".","For","usage","habits","of","VisualDL",",","actually","call","self._add_items","(",")","Args",":","run",":","Identity","of","one","tablet",".","tag",":","Identity","of","one","record","in","tablet",".","item",":","New","item","to","add","to","bucket","."]
code: def add_scalar_item(self, run, tag, item):
      """Add a new scalar item to reservoir buckets with given tag as key.
  
      For usage habits of VisualDL, actually call self._add_items()
  
      Args:
          run: Identity of one tablet.
          tag: Identity of one record in tablet.
          item: New item to add to bucket.
      """
      if item.WhichOneof("one_value") == "value":
          key = run + "/" + tag
          self._add_scalar_item(key, item)
      elif item.WhichOneof("one_value") == "tag_value":
          key = (
              run
              + "/"
              + add_sub_tag(tag, item.tag_value.tag)
              + "/"
              + tag
          )
          self._add_scalars_item(key, item)
      else:
          raise ValueError(
              "Not scalar type:" + item.WhichOneof("one_value")
          )
  
imports: import collections
  import random
  import threading
label_desc: Use image node_id 13 for calling the Reservoir obj's underlying member method code with example usage: obj.add_scalar_item(run, tag, item) without return types