def encode_topic_name(topic_names, to_byte=True):
    """Create topic name.

    Mainly used for creating a topic name for publisher.

    # Arguments
        topic_names: list
            a list of strings
    # Returns
        topic_name: byte string
            the topic name separated by "/"
    """
    topic_name = "/".join(topic_names)
    if to_byte is True:
        return topic_name.encode("utf-8")
    else:
        return topic_name