<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def atlas_peer_has_fresh_zonefile_inventory( peer_hostport, peer_table=None ):
 """ Does the given atlas node have a fresh zonefile inventory? """


    fresh = False
    with AtlasPeerTableLocked(peer_table) as ptbl:
        if peer_hostport not in ptbl.keys():
            return False

        now = time_now()
        peer_inv = atlas_peer_get_zonefile_inventory( peer_hostport, peer_table=ptbl )

        # NOTE: zero-length or None peer inventory means the peer is simply dead, but we've pinged it
        if  ptbl[peer_hostport].has_key('zonefile_inventory_last_refresh') and \
            ptbl[peer_hostport]['zonefile_inventory_last_refresh'] + atlas_peer_ping_interval() > now:

            fresh = True

    return fresh