<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def worker_config(queue, s3_key, period, verbose):
 """daemon queue worker for config notifications"""

    logging.basicConfig(level=(verbose and logging.DEBUG or logging.INFO))
    logging.getLogger('botocore').setLevel(logging.WARNING)
    logging.getLogger('s3transfer').setLevel(logging.WARNING)

    queue, region = get_queue(queue)
    factory = SessionFactory(region)
    session = factory()
    client = session.client('sqs')
    messages = MessageIterator(client, queue, timeout=20)

    for m in messages:
        msg = unwrap(m)
        if 'configurationItemSummary' in msg:
            rtype = msg['configurationItemSummary']['resourceType']
        else:
            rtype = msg['configurationItem']['resourceType']
        if rtype not in RESOURCE_MAPPING.values():
            log.info("skipping %s" % rtype)
            messages.ack(m)
        log.info("message received %s", m)