code: def set_(name, add, match):
      '''
      Add a value to the named set
  
      USAGE:
  
      .. code-block:: yaml
  
          foo:
            reg.set:
              - add: bar
              - match: my/custom/event
      '''
      ret = {'name': name,
             'changes': {},
             'comment': '',
             'result': True}
      if name not in __reg__:
          __reg__[name] = {}
          __reg__[name]['val'] = set()
      for event in __events__:
          if salt.utils.stringutils.expr_match(event['tag'], match):
              try:
                  val = event['data']['data'].get(add)
              except KeyError:
                  val = event['data'].get(add)
              if val is None:
                  val = 'None'
              ret['changes'][add] = val
              __reg__[name]['val'].add(val)
      return ref set_(name, add, match):
      '''
      Add a value to the named set
  
      USAGE:
  
      .. code-block:: yaml
  
          foo:
            reg.set:
              - add: bar
              - match: my/custom/event
      '''
      ret = {'name': name,
             'changes': {},
             'comment': '',
             'result': True}
      if name not in __reg__:
          __reg__[name] = {}
          __reg__[name]['val'] = set()
      for event in __events__:
          if salt.utils.stringutils.expr_match(event['tag'], match):
              try:
                  val = event['data']['data'].get(add)
              except KeyError:
                  val = event['data'].get(add)
              if val is None:
                  val = 'None'
              ret['changes'][add] = val
              __reg__[name]['val'].add(val)
      return ret
docs: Add a value to the named set
  
      USAGE:
  
      .. code-block:: yaml
  
          foo:
            reg.set:
              - add: bar
              - match: my/custom/event