original_docstring: Create Announcement & assign to memcache; used by
          memcache cron job & putAnnouncement().
          
docstring: Create Announcement & assign to memcache; used by
  memcache cron job & putAnnouncement().
docstring_tokens: Create Announcement & assign to memcache ; used by memcache cron job & putAnnouncement () .
code: def _cacheFeatureSpeaker(websafeConferenceKey, speaker):
          """Create Announcement & assign to memcache; used by
          memcache cron job & putAnnouncement().
          """
          q = Session.query()
          q.filter(Session.websafeConferenceKey == websafeConferenceKey)
          q.filter(Session.speaker ==speaker)
          sessionNames = [session.name for session in q]
  
          if len(sessionNames) > 0:
              # If there are almost sold out conferences,
              # format announcement and set it in memcache
              featureSpeaker = ('The featured speaker '+speaker+' has the following Sessions: %s')
  
              announcement = featureSpeaker % (
                  ', '.join(sn for sn in sessionNames))
              memcache.set(MEMCACHE_FEATURESPEAKER_KEY, announcement)
          else:
              # If there are no sold out conferences,
              # delete the memcache announcements entry
              announcement = ""
              memcache.delete(MEMCACHE_FEATURESPEAKER_KEY)
  
          return announcement
code_tokens: def _cacheFeatureSpeaker ( websafeConferenceKey , speaker ) : q = Session . query ( ) q . filter ( Session . websafeConferenceKey == websafeConferenceKey ) q . filter ( Session . speaker == speaker ) sessionNames = [ session . name for session in q ] if len ( sessionNames ) > 0 : featureSpeaker = ( 'The featured speaker ' + speaker + ' has the following Sessions: %s' ) announcement = featureSpeaker % ( ', ' . join ( sn for sn in sessionNames ) ) memcache . set ( MEMCACHE_FEATURESPEAKER_KEY , announcement ) else : announcement = "" memcache . delete ( MEMCACHE_FEATURESPEAKER_KEY ) return announcement
short_docstring: Create Announcement & assign to memcache; used by
  memcache cron job & putAnnouncement().
short_docstring_tokens: Create Announcement & assign to memcache ; used by memcache cron job & putAnnouncement () .
comment: """Create Announcement & assign to memcache; used by
          memcache cron job & putAnnouncement().
          """$SEP$# If there are almost sold out conferences,
  $SEP$# format announcement and set it in memcache
  $SEP$# If there are no sold out conferences,
  $SEP$# delete the memcache announcements entry
  