event_topic (Union[List[str], str]): The event_topic as a list of strings or a single string. Strings should be alphanumeric + underscore and '-' characters only. The list forms a hierarchy of topics.
"""
ifisinstance(event_topic,str):
if"."inevent_topic:
event_topic_list=event_topic.split(".")
else:
event_topic_list=[event_topic]
else:
event_topic_list=event_topic
ifnot_validate_topics(event_topic_list):
raiseValueError(
"Invalid event_topic. Only alphanumeric characters, underscores, and hyphens are allowed."