code: 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)
docs: Add an (isWhitelist, rule) pair to the rule list.