code: def beacon(config):
      '''
      Called several times each second
      https://docs.saltstack.com/en/latest/topics/beacons/#the-beacon-function
  
      .. code-block:: yaml
  
          beacons:
            proxy_example:
              - endpoint: beacon
      '''
      # Important!!!
      # Although this toy example makes an HTTP call
      # to get beacon information
      # please be advised that doing CPU or IO intensive
      # operations in this method will cause the beacon loop
      # to block.
      _config = {}
      list(map(_config.update, config))
  
      beacon_url = '{0}{1}'.format(__opts__['proxy']['url'],
                                   _config['endpoint'])
      ret = salt.utils.http.query(beacon_url,
                                  decode_type='json',
                                  decode=True)
      return [ret['dict']f beacon(config):
      '''
      Called several times each second
      https://docs.saltstack.com/en/latest/topics/beacons/#the-beacon-function
  
      .. code-block:: yaml
  
          beacons:
            proxy_example:
              - endpoint: beacon
      '''
      # Important!!!
      # Although this toy example makes an HTTP call
      # to get beacon information
      # please be advised that doing CPU or IO intensive
      # operations in this method will cause the beacon loop
      # to block.
      _config = {}
      list(map(_config.update, config))
  
      beacon_url = '{0}{1}'.format(__opts__['proxy']['url'],
                                   _config['endpoint'])
      ret = salt.utils.http.query(beacon_url,
                                  decode_type='json',
                                  decode=True)
      return [ret['dict']]
docs: Called several times each second
      https://docs.saltstack.com/en/latest/topics/beacons/#the-beacon-function
  
      .. code-block:: yaml
  
          beacons:
            proxy_example:
              - endpoint: beacon