<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def process_announcement( sender_namerec, op, working_dir ):
 """ If the announcement is valid, then immediately record it. """

    node_config = get_blockstack_opts()

    # valid announcement
    announce_hash = op['message_hash']
    announcer_id = op['announcer_id']
   
    # verify that it came from this individual
    name_history = sender_namerec['history']
    allowed_value_hashes = []
    for block_height in name_history.keys():
        for historic_namerec in name_history[block_height]:
            if historic_namerec.get('value_hash'):
                allowed_value_hashes.append(historic_namerec['value_hash'])

    if announce_hash not in allowed_value_hashes:
        # this individual did not send this announcement
        log.warning("Announce hash {} not found in name history for {}".format(announce_hash, announcer_id))
        return 

    # go get it from Atlas
    zonefiles_dir = node_config.get('zonefiles', None)
    if not zonefiles_dir:
        log.warning("This node does not store zone files, so no announcement can be found")
        return 

    announce_text = get_atlas_zonefile_data(announce_hash, zonefiles_dir)
    if announce_text is None:
        log.warning("No zone file {} found".format(announce_hash))
        return

    # go append it 
    log.critical("ANNOUNCEMENT (from %s): %s\n------BEGIN MESSAGE------\n%s\n------END MESSAGE------\n" % (announcer_id, announce_hash, announce_text))         
    store_announcement( working_dir, announce_hash, announce_text )