(topicName: str)
return topicTuple
If topicName is a tuple of strings, just return it as is. Otherwise,
    convert it to tuple, assuming dotted notation used for topicName. I.e.
    'a.b.c' => ('a','b','c'). Empty topicName is not allowed (ValueError).
    The reverse operation is stringize(topicNameTuple).
If topicName is a tuple of strings, just return it as is. Otherwise,
    convert it to tuple, assuming dotted notation used for topicName. I.e.
    'a.b.c' => ('a','b','c'). Empty topicName is not allowed (ValueError).
    The reverse operation is stringize(topicNameTuple).
If topicName is a tuple of strings just return it as is . Otherwise convert it to tuple assuming dotted notation used for topicName . I . e . a . b . c = > ( a b c ) . Empty topicName is not allowed ( ValueError ) . The reverse operation is stringize ( topicNameTuple ) .
def tupleize(topicName: str) -> Tuple[str, ...]:
    """
    If topicName is a tuple of strings, just return it as is. Otherwise,
    convert it to tuple, assuming dotted notation used for topicName. I.e.
    'a.b.c' => ('a','b','c'). Empty topicName is not allowed (ValueError).
    The reverse operation is stringize(topicNameTuple).
    """
    # assume name is most often str; if more often tuple,
    # then better use isinstance(name, tuple)
    if hasattr(topicName, "msgDataSpec"):
        topicName = topicName._topicNameStr
    if isinstance(topicName, str):
        topicTuple = tuple(topicName.split('.'))
    else:
        topicTuple = tuple(topicName)  # assume already tuple of strings

    if not topicTuple:
        raise TopicNameError(topicTuple, "Topic name can't be empty!")

    return topicTuple
def tupleize ( topicName : str ) -> Tuple [ str , ... ] : # assume name is most often str; if more often tuple, # then better use isinstance(name, tuple) if hasattr ( topicName , "msgDataSpec" ) : topicName = topicName . _topicNameStr if isinstance ( topicName , str ) : topicTuple = tuple ( topicName . split ( '.' ) ) else : topicTuple = tuple ( topicName ) # assume already tuple of strings if not topicTuple : raise TopicNameError ( topicTuple , "Topic name can't be empty!" ) return topicTuple