<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def check_topics(client, req_topics):
 """Check for existence of provided topics in Kafka."""

    client.update_cluster()
    logger.debug('Found topics: %r', client.topics.keys())

    for req_topic in req_topics:
        if req_topic not in client.topics.keys():
            err_topic_not_found = 'Topic not found: {}'.format(req_topic)
            logger.warning(err_topic_not_found)
            raise TopicNotFound(err_topic_not_found)

        topic = client.topics[req_topic]
        if not topic.partitions:
            err_topic_no_part = 'Topic has no partitions: {}'.format(req_topic)
            logger.warning(err_topic_no_part)
            raise TopicNoPartition(err_topic_no_part)

        logger.info('Topic is ready: %s', req_topic)