<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def pubsub_sub(self, topic, discover=False, **kwargs):
 """Subscribe to mesages on a given topic Subscribing to a topic in IPFS means anytime a message is published to a topic, the subscribers will be notified of the publication. The connection with the pubsub topic is opened and read. The Subscription returned should be used inside a context manager to ensure that it is closed properly and not left hanging. .. code-block:: python # publish a message 'hello' to the topic 'testing' {'from': '<base64encoded IPFS id>', 'data': 'aGVsbG8=', 'topicIDs': ['testing']} # NOTE: in order to receive published data # you must already be subscribed to the topic at publication # time. Parameters topic : str Name of a topic to subscribe to discover : bool Try to discover other peers subscibed to the same topic (defaults to False) Returns ------- Generator wrapped in a context manager that maintains a connection stream to the given topic. """

        args = (topic, discover)
        return SubChannel(self._client.request('/pubsub/sub', args,
                          stream=True, decoder='json'))