class_docstr: Watches numbers so that they don't overflow and wrap
  (reset to zero).
class_docstr_tok: ["Watches","numbers","so","that","they","do","n't","overflow","and","wrap","(","reset","to","zero",")","."]
docstr: Cache dict and sum numbers which overflow and wrap.
  Return an updated copy of `input_dict`
docstr_tok: ["Cache","dict","and","sum","numbers","which","overflow","and","wrap",".","Return","an","updated","copy","of","`","input_dict","`"]
code: def run(self, input_dict, name):
      """Cache dict and sum numbers which overflow and wrap.
      Return an updated copy of `input_dict`
      """
      if name not in self.cache:
          # This was the first call.
          self._add_dict(input_dict, name)
          return input_dict
  
      self._remove_dead_reminders(input_dict, name)
  
      old_dict = self.cache[name]
      new_dict = {}
      for key in input_dict.keys():
          input_tuple = input_dict[key]
          try:
              old_tuple = old_dict[key]
          except KeyError:
              # The input dict has a new key (e.g. a new disk or NIC)
              # which didn't exist in the previous call.
              new_dict[key] = input_tuple
              continue
  
          bits = []
          for i in range(len(input_tuple)):
              input_value = input_tuple[i]
              old_value = old_tuple[i]
              remkey = (key, i)
              if input_value < old_value:
                  # it wrapped!
                  self.reminders[name][remkey] += old_value
                  self.reminder_keys[name][key].add(remkey)
              bits.append(input_value + self.reminders[name][remkey])
  
          new_dict[key] = tuple(bits)
  
      self.cache[name] = input_dict
      return new_dict
  
imports: from __future__ import division, print_function
  import contextlib
  import errno
  import functools
  import os
  import socket
  import stat
  import sys
  import threading
  import warnings
  from collections import defaultdict
  from collections import namedtuple
  from socket import AF_INET
  from socket import SOCK_DGRAM
  from socket import SOCK_STREAM
label_desc: Use image node_id 4 for calling the _WrapNumbers obj's underlying member method code with example usage: obj.run(input_dict, name) and returns: new_dict, input_dict