code: def _handle_subscription(self, topics):
          
          if not isinstance(topics, list):
              topics = [topics]
          for topic in topics:
              topic_levels = topic.split('/')
              try:
                  qos = int(topic_levels[-2])
              except ValueError:
                  qos = 0
              try:
                  _LOGGER.debug('Subscribing to: %s, qos: %s', topic, qos)
                  self._sub_callback(topic, self.recv, qos)
              except Exception as exception:  # pylint: disable=broad-except
                  _LOGGER.exception(
                      'Subscribe to %s failed: %s', topic, exception)
docs: Handle subscription of topics.