def get_published_topics(self):
published_topics = []<EOL>seen_topics = {}<EOL>for es in self.get_exported_streams():<EOL><INDENT>pt = es._as_published_topic()<EOL>if pt is not None:<EOL><INDENT>if pt.topic in seen_topics:<EOL><INDENT>if pt.schema is None:<EOL><INDENT>continue<EOL><DEDENT>if pt.schema in seen_topics[pt.topic]:<EOL><INDENT>continue<EOL><DEDENT>seen_topics[pt.topic].append(pt.schema)<EOL><DEDENT>else:<EOL><INDENT>seen_topics[pt.topic] = [pt.schema]<EOL><DEDENT>published_topics.append(pt)<EOL><DEDENT><DEDENT>return published_topics<EOL>
Get a list of published topics for this instance.

        Streams applications publish streams to a a topic that can be subscribed to by other
        applications. This allows a microservice approach where publishers
        and subscribers are independent of each other.

        A published stream has a topic and a schema. It is recommended that a
        topic is only associated with a single schema.

        Streams may be published and subscribed by applications regardless of the
        implementation language. For example a Python application can publish
        a stream of JSON tuples that are subscribed to by SPL and Java applications.

        Returns:
             list(PublishedTopic): List of currently published topics.