For what it's worth, this could also be:

````python
def shouldRespond(text):
  topic, number = shouldRespond(text)
  if topic, number != (None, None):
    list_ids = getPhotoIdsForTopic(topic)
    return ','.join([getPhotoUrlForId(photo_id) for photo_id in list_ids])
````