(self, topicNameDotted: str)
return self.__allTopics, subtopicNames
Returns a pair, (closest parent, tuple path from parent). The
        first item is the closest parent Topic that exists.
        The second one is the list of topic name elements that have to be
        created to create the given topic.

        So if topicNameDotted = A.B.C.D, but only A.B exists (A.B.C and
        A.B.C.D not created yet), then return is (A.B, ['C','D']).
        Note that if none of the branch exists (not even A), then return
        will be [root topic, ['A',B','C','D']). Note also that if A.B.C
        exists, the return will be (A.B.C, ['D']) regardless of whether
        A.B.C.D exists.
Returns a pair, (closest parent, tuple path from parent). The
        first item is the closest parent Topic that exists.
        The second one is the list of topic name elements that have to be
        created to create the given topic.
Returns a pair ( closest parent tuple path from parent ) . The first item is the closest parent Topic that exists . The second one is the list of topic name elements that have to be created to create the given topic .
def __getClosestParent(self, topicNameDotted: str) -> Topic:
        """
        Returns a pair, (closest parent, tuple path from parent). The
        first item is the closest parent Topic that exists.
        The second one is the list of topic name elements that have to be
        created to create the given topic.

        So if topicNameDotted = A.B.C.D, but only A.B exists (A.B.C and
        A.B.C.D not created yet), then return is (A.B, ['C','D']).
        Note that if none of the branch exists (not even A), then return
        will be [root topic, ['A',B','C','D']). Note also that if A.B.C
        exists, the return will be (A.B.C, ['D']) regardless of whether
        A.B.C.D exists.
        """
        subtopicNames = []
        headTail = topicNameDotted.rsplit('.', 1)
        while len(headTail) > 1:
            parentName = headTail[0]
            subtopicNames.insert(0, headTail[1])
            obj = self._topicsMap.get(parentName, None)
            if obj is not None:
                return obj, subtopicNames

            headTail = parentName.rsplit('.', 1)

        subtopicNames.insert(0, headTail[0])
        return self.__allTopics, subtopicNames
def __getClosestParent ( self , topicNameDotted : str ) -> Topic : subtopicNames = [ ] headTail = topicNameDotted . rsplit ( '.' , 1 ) while len ( headTail ) > 1 : parentName = headTail [ 0 ] subtopicNames . insert ( 0 , headTail [ 1 ] ) obj = self . _topicsMap . get ( parentName , None ) if obj is not None : return obj , subtopicNames headTail = parentName . rsplit ( '.' , 1 ) subtopicNames . insert ( 0 , headTail [ 0 ] ) return self . __allTopics , subtopicNames