def _addRule(self, isWhitelist, rule):
    if isinstance(rule, six.string_types) or hasattr(rule, '__call__'):
      self.rules.append((isWhitelist, rule))
    else:
      raise TypeError('Graphite logging rules must be glob pattern or callable. Invalid: %r' % rule)
Add an (isWhitelist, rule) pair to the rule list.
dataset/ETHPy150Open Cue/scales/src/greplin/scales/graphite.py/GraphitePusher._addRule