def _find_connection(self, topic):
        """Attempt to find a connection id corresponding with a topic

        The device is found by assuming the topic ends in <slug>/[control|data]/channel

        Args:
            topic (string): The topic we received a message on

        Returns:
            int: The internal connect id (device slug) associated with this topic
        """

        parts = topic.split('/')
        if len(parts) < 3:
            return None

        slug = parts[-3]
        return slug
Attempt to find a connection id corresponding with a topic

        The device is found by assuming the topic ends in <slug>/[control|data]/channel

        Args:
            topic (string): The topic we received a message on

        Returns:
            int: The internal connect id (device slug) associated with this topic