docs: def beacon(config):
      '''
      Emit a dict name "texts" whose value is a list
      of texts.
  
      .. code-block:: yaml
  
          beacons:
            twilio_txt_msg:
              - account_sid: "<account sid>"
              - auth_token: "<auth token>"
              - twilio_number: "+15555555555"
              - interval: 10
  
      '''
      log.trace('twilio_txt_msg beacon starting')
  
      _config = {}
      list(map(_config.update, config))
  
      ret = []
      if not all([_config['account_sid'],
                  _config['auth_token'],
                  _config['twilio_number']]):
          return ret
      output = {}
      output['texts'] = []
      client = TwilioRestClient(_config['account_sid'], _config['auth_token'])
      messages = client.messages.list(to=_config['twilio_number'])
      num_messages = len(messages)
      log.trace('Num messages: %d', num_messages)
      if not num_messages:
          log.trace('Twilio beacon has no texts')
          return ret
  
      for message in messages:
          item = {}
          item['id'] = six.text_type(message.sid)
          item['body'] = six.text_type(message.body)
          item['from'] = six.text_type(message.from_)
          item['sent'] = six.text_type(message.date_sent)
          item['images'] = []
  
          if int(message.num_media):
              media = client.media(message.sid).list()
              if media:
                  for pic in media:
                      item['images'].append(six.text_type(pic.uri))
          output['texts'].append(item)
          message.delete()
      ret.append(output)
      return ret