@retry(check_exceptions=(TopicNoPartition, TopicNotFound))<EOL>def check_topics(client, req_topics):
client.update_cluster()<EOL>logger.debug('<STR_LIT>', client.topics.keys())<EOL>for req_topic in req_topics:<EOL><INDENT>if req_topic not in client.topics.keys():<EOL><INDENT>err_topic_not_found = '<STR_LIT>'.format(req_topic)<EOL>logger.warning(err_topic_not_found)<EOL>raise TopicNotFound(err_topic_not_found)<EOL><DEDENT>topic = client.topics[req_topic]<EOL>if not topic.partitions:<EOL><INDENT>err_topic_no_part = '<STR_LIT>'.format(req_topic)<EOL>logger.warning(err_topic_no_part)<EOL>raise TopicNoPartition(err_topic_no_part)<EOL><DEDENT>logger.info('<STR_LIT>', req_topic)<EOL><DEDENT>
Check for existence of provided topics in Kafka.